I have a situation in which a user can click a row and change data for that row, which will change a Boolean indicating the code has been changed. Then when the user clicks a new row, the click event should check to see if CodeChanged = true, if so, then a messagebox will pop-up asking the user if they would like to save unsaved data. If they click yes then the click event should be cancelled and the previously selected row should stay selected. What is the best way to go about doing this?
You could use the BeforeRowDeactivate or BeforeRowUpdate events for this.