Alex Rivera | Logout

C#: How do you make sure that a row or item is selected in ListView before performing an action?

Asked 2009-05-03T15:16:08.507
11

What is the best way to check if there is atleast a selected item in a listview or not in an if statement?

Edit
Report

1 Answer

0
if( listView.SelectedItems.Count > 0 ){
 // do stuff here
}
answered 2009-05-03T15:22:52.500

Your Answer