Max length in batch edit mode

2 posts, 0 answers
  1. miksh
    miksh avatar
    285 posts
    Member since:
    Nov 2006

    Posted 07 Mar 2017 Link to this post

    How to set a max length validation to a DataBound column in the batch edit mode?

    E.g. in your demo if you enter a long product name it will fail with "Product with ID 76 cannot be updated. Reason: String or binary data would be truncated. The statement has been terminated."

    I tied to set MaxLength but it doesn't work

    <telerik:GridBoundColumn UniqueName="ProductName"
       DataField="ProductName" MaxLength="40"
       HeaderText="Product Name">
  2. Mike
    Mike avatar
    8 posts
    Member since:
    Oct 2014

    Posted 07 Aug 2017 Link to this post

    I assume by the lack of replies that there is no built-in solution for this using the MaxLength attribute with Batch editing?

    I can achieve the client-side functionality by setting a ColumnEditorID for the column and setting the TextBoxMaxLength attribute on the editor, but that obviously isn't an ideal solution for multiple columns with different text lengths.

Back to Top