Is there any event that fires when a value in the dataset fails to resolve to a valuelist item?
There's no event specifically for this. But I think if you set the column Style to DropDownValidate, the CellDataError event will fire if the user tried to leave the cell with a value that is not on the list. You could also use BeforeExitEditMode or BeforeCellUpdate and validate the value against the list yourself.
The problem is not caused by user interaction.
A more hands on example:
We have some rows in a grid where we can select active users from a valuelist. We only fill the valuelist with active users. Now, when I disable a user I reload the valuelist. If that person was selected on one of the gridrows it will only display it's user id.
The only solution I come up with so far is to run valuelist resolved on all rows and check if SelectedIndex is bigger than -1. Not very CPU friendly. Is there a better solution?
Hi Emil,
No, I can't think of any better way to do it than that. The grid doesn't fire any events for a case like this. What you are trying to do here is really more of a data operation. Since the grid is mainly a UI component, it's not really designed to help you validate the data except where it concerns UI.