I have a ListBox with two columns. The fist is a check box and the second a standard text field. I need to make is so that when a user tries to uncheck an item it won’t allow them to do it based on certain conditions. I tried doing this in the CellClick event but it only works if the row that the user is trying to uncheck is the currently selected row. How can I make it so any time a user tries to uncheck an item it fires an event regardless of the currently selected row?
Your statements make no sense…
How can a user uncheck an item unless they are on that row?
this contradicts the above statement
Easy, click on a check box in any row and that check box will check or uncheck regardless of whether the row is currently selected or not.
Edit: I was able to solve this by using the CellAction event which fires when a check box state changes.
Dave, I think the general idea is to make the checkbox a “required to be selected” when certain criteria are met.
Anthony, you can’t unfortunately change the value within the event. Use a
Timer with a short delay (25ms should be fine) to re-set the value to true outside of the
CellAction event (use this event, not