Click here to Skip to main content
15,036,823 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a listview with 20+ items. Each item has a datepickers and comboboxes.
When I select lets say the 3rd item, but moving the mouse over the 10th and click on the combobox, I can edit it but the change will be applied to both the 3rd and 10th items.

Note, i still need to be able multi items, but only in case they are selected.

Is there any way to disable item edit if it is not selected?

Is there any best practice?

What I have tried:

had no idea, and could not find any useful article on the net. (most probably the issue is with my search words)
Updated 26-Apr-20 22:36pm
Alan N 26-Apr-20 11:14am
What control are you using? The title says listview but the text mentions a listbox containing child controls. I'm confused - please give full type names.
Member 13050667 27-Apr-20 4:36am
sorry my bad, indeed its a listview and not listbox
BillWoodruff 27-Apr-20 9:04am
need more specific information on the structure of your ListView. Why do you need multiple selection ?
Member 13050667 27-Apr-20 11:54am
this is a project manager tool. Imagine the items as files and i do need to perform certain actions on multiple files at once and in some cases only on one file.
But in my case if no item is clicked as selected or as described a different item is selected I can still click a different row's combobox and that will perform the changes to both lines.

1 solution

BillWoodruff 27-Apr-20 8:59am
how is that article relevant to the OP's question ?
RickZeeland 27-Apr-20 10:03am
The example is with checkboxes, which might not be what he wants, but it shows how you can use an event to handle things.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900