Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Prevent a listview item selection change and keep previous selection

$
0
0

 

Any suggestions as to how I can achieve this....

 

I have a listview in a user control.  What I need to do is when the user selects a different item in the list, first validate the item that was selected, and if the validation is OK, select the item and display details in another user control.  However if the validation fails, I need to keep the selection of the original item in the list.

 

 

I have tried using the OnItemSelectionChanged event - using the selected and unselected state, but the new item is always highlighted.

 

 

Thanks and regards,

 


Viewing all articles
Browse latest Browse all 12583

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>