.net - C#: How do you make sure that a row or item is selected in ListView before performing an action? -
What is the best way to see if a list contains at least one selected item or not, in the statement?
I'm pretty sure what you are asking Do you want to make sure that any work is going on Should at least 1 item be selected before? If this is the case, then do the following
if (listView.SelectedItems.Count> gt; 0) {// do something} or if you Are the special items selected? If so, try
(if listView.SelectedItems.Contains (SomeItem)) {// something}
Comments
Post a Comment