0
votes

i have a custom ListView control and Custom ListViewItem that has a tri-state checkbox, when i am using the myListView1_ItemCheck event, the ItemCheckEventArgs e the item is of type listviewitem not the custom one i had made, how can i modify the event to handle the custom listviewitem i had? thanks for helping

1
Does your custom ListViewItem inherit from the base ListViewItem? In that case the item of type ListViewItem is not incorrect, it's just that you will have to cast it to your more specific type. - Matt Burland
There is no e.item, post some code to make the issue accurate. - Henk Holterman
Matt: yes it is inhereted from the base item, but the problem is that if fires the myListView1_ItemCheck event only for the checked and unchecked states the third state it does not fire the event on it - AnasBakez
@AnasBakez: That's a different question and you'll need to show some code for your custom ListViewItem for anybody to be able to help you with that. - Matt Burland

1 Answers

1
votes

You can't really change the existing code, but you should be able to typecast the item to your type.