Myles McDonnell
Myles McDonnell

Reputation: 13335

Janus GridEX.AddingRecord - Access Values

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

Answers (1)

Adel Khayata
Adel Khayata

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

Related Questions