Reputation: 13335
The GridEX.AddingRecord is the obvious hook for validation but I can't work out how to access the values entered into the new row cells?
My grid is bound to a DTO. _grid.GetRow().DataRow returns DTO with none of the properties set.
Upvotes: 0
Views: 1348
Reputation: 2836
Use the following code to access cell values in the AddingRecord event:
object value = grid.GetRow().Cells["ColumnName"].Value;
Where "ColumnName" is the Column Key in Grid's properties.
Off course you have to cast the value returned to the data type you are expecting from this field.
Upvotes: 3