This is a migrated thread and some comments may be shown as answers.

Validations for text box in CellTemplate selector

1 Answer 8 Views
This is a migrated thread and some comments may be shown as answers.
Raju
Top achievements
Rank 1
Raju asked on 07 Feb 2020, 12:57 PM

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.

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 10 Feb 2020, 11:04 AM

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.
Asked by
Raju
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or