Hi,
I am using ultra grid to show different records, each record type has a different string length validation I need to validate each row in a separate mechanism meaning the Name field for one record should have a length limit different then Name field of another record.
I can see the text limitation for a column but how can I do it per cell?
Thanks
Koby
You could do this by assigning a different UltraTextEditor instance to each of the cells that has a different max length requirement, and setting the control's MaxLength property accordingly. Personally I would handle BeforeExitEditMode, cast the sender parameter to type EmbeddableEditorBase, and use the EmbeddableEditorBase.CurrentEditText property to determine the string length of the editor's value. Then set the Cancel property of the event arguments based on whether the length requirement is satisfied.
How do I assign UltraTextEditor to each one of the cell?
Koby.
Hi Koby,
There is an EditorControl (or EditorComponent) property on the cell, just like on the column. A good place to do this is usually the InitializeRow event.