0

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.

Myles McDonnell
  • 12,943
  • 17
  • 66
  • 116

1 Answers1

3

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.

Adel Khayata
  • 2,717
  • 10
  • 28
  • 46