How to copy a validation type/data from a cell or from a row to another

Hello,

I want to, on my grid, when user adds or insert a row, all the validation from the other rows are copied to this, there is a way to access the validation type and data from each cell???

Thanks,

Rudolf Gütlich
Delsis Eng.

Hi Graffiti,

The Validation model is object referencing. So you may use a single validation object with mutiple cells. For example:

Validation v = cell1.CreateValidation(...);

// "copy" validation to another cell

cell2.Validation = cell1.Validation;

cell3.Validation = cell1.Validation;

The cell2, cell3 now have the same validation behavior as the cell1's.

So, when you insert a row, you may handle the RowInserted event to "copy" validations.

I hope this helps. Thank you.