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

serverside validation during pop-up editing not working with custom template

1 Answer 235 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Terence
Top achievements
Rank 1
Terence asked on 23 Jan 2013, 11:06 AM
Hi,

I have followed this example to implement server side validation in my grid edit:

http://www.kendoui.com/code-library/mvc/grid/handling-server-side-validation-errors-during-pop-up-editing.aspx

It works when I used the standard pop up editor but when I substitute it with my custom template editor the tool tip with the model error does not display.

How can I modify this to work with a custom template ? ie one that sits in sharedviews\editor templates\

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 24 Jan 2013, 03:14 PM
Hi Terence,

 
Basically you should define where the validation massage will appear using the "Html.ValidationMessageFor" helper - please check the example below:

@(Html.TextBoxFor(m => m.Name))
@Html.ValidationMessageFor(m => m.Name)

For convenience I updated the "Handling server-side validation errors during pop-up editing" demo to use custom PopUp editor and attached it to the current thread.


 Kind Regards,
Vladimir Iliev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Terence
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or