I want to validate editing cell, if the cell value is empty or null. I want to show error message to user something like "Field cannot be empty"
Please find attached image
Hi Marc,
You're responding to an almost 2-year-old thread here and you seem to have hit the ground running and left me behind. So I'm not even sure what you are asking.
Marc Roussel said: I don't find DataErrorInfo on e.Cell.Row in AfterCellUpdate.
I don't find DataErrorInfo on e.Cell.Row in AfterCellUpdate.
What do you mean by this? Are you saying the property doesn't exist? If so, then the only explanation for that is that you are using an old version of the controls from before that property was added.
Marc Roussel said:In fact since the value is valid because I selected an entry from the DropDownList after AutoComplete found a match it should'nt be in error ?
What does this mean? Are you saying you are getting an error of some kind? What's the error? The grid doesn't create DataErrorInfo automatically. These are either on the DataSource or the grid and they are added by you, the developer.
In fact since the value is valid because I selected an entry from the DropDownList after AutoComplete found a match it should'nt be in error ?
I don't find DataErrorInfo on e.Cell.Row in AfterCellUpdate. I have to remove the error since I programmatically set the value correct and I need to remove the Cell error state
Thanks Mike I tried again that works awesome
Hi Mike,
Thanks. I tried that but doesn't work. I suspect is there any different cell event where i need to use this code instead of using in intialize row?
Private Sub ugMain_InitializeRow(sender As Object, e As InitializeRowEventArgs) Handles ugMain.InitializeRow Select Case laborManagementMaintenanceType Case "Manage Equipment" If e.Row.Cells("Title").Value Is DBNull.Value Then e.Row.DataErrorInfo.SetColumnError("Title", "Cell Error: Zero is invalid.") Else e.Row.DataErrorInfo.ClearErrors() End If