Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
90
Wingrid cell validation
posted

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

Parents
  • 69832
    Suggested Answer
    Offline posted

    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.

Reply Children