Validations for text box in CellTemplate selector

2 posts, 0 answers
  1. Raju
    Raju avatar
    1 posts
    Member since:
    Feb 2020

    Posted 07 Feb Link to this post

    I have placed a text box control and I have to write validation rule for it.

    But the problem is I have bound a collection to the grid view and I have declared only two columns 

    one for binding Name

    other for value [data template changes depending on property] so I have  overridden selecttemplate method . Based on the item input I have choosen the datatemplate.

    Now if write a validation rule for text box ,it applies for all the text boxes in grid.The rule should be individual for each textbox

    Can you help me resolving the issue.

  2. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2425 posts

    Posted 10 Feb Link to this post

    Hello Raju,

    From your setup, it looks like the validation rule will be applied only for the TextBox elements in the cell of the corresponding column (the one that uses the CellTemplateSelector). Can you tell me what do you mean that the validation rule is applied to all textboxes? Are you talking about the cells in other columns? Also, can you share few pictures of the current and the expected result?

    Regards,
    Martin Ivanov
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top