This question is locked. New answers and comments are not allowed.
I have an ASP.NET MVC data entry form. I am using data annotations on the model to specify the validations to be performed. However, I would like to display the Validation Summary in a modal Telerik Window control.
I currently have the following defined for the window:
I have two separate issues that I haven't been able to resolve:
1) You may notice from the code sample above that the Window is currently visible (for testing). When I click on the Submit button for the form, the validation messages are displayed next to their corresponding controls, but nothing is displayed in the window. I am suspicious that this is due to the Validation Summary in the Window not being contained in the same form. But, I'm not sure how to get at the data to populate it manually.
2) I would like to make the window invisible and only display it when there are errors. However, I haven't been able to find the correct event to capture the result of the client-side validation and show the Window appropriately.
Any ideas, samples, blog posts, etc. describing how to accomplish this would be greatly appreciated.
Regards,
-Darren
I currently have the following defined for the window:
@{Html.Telerik().Window() .Name("ErrorMsgWindow") .Draggable(true) .Buttons(b => { b.Close(); }) .Modal(false) .Resizable(r => { r.Enabled(true); r.MinHeight(350); r.MinWidth(560); }) .Scrollable(true) .Visible(true) .Content( @<text> @Html.ValidationSummary() </text> ) .Render(); }I have two separate issues that I haven't been able to resolve:
1) You may notice from the code sample above that the Window is currently visible (for testing). When I click on the Submit button for the form, the validation messages are displayed next to their corresponding controls, but nothing is displayed in the window. I am suspicious that this is due to the Validation Summary in the Window not being contained in the same form. But, I'm not sure how to get at the data to populate it manually.
2) I would like to make the window invisible and only display it when there are errors. However, I haven't been able to find the correct event to capture the result of the client-side validation and show the Window appropriately.
Any ideas, samples, blog posts, etc. describing how to accomplish this would be greatly appreciated.
Regards,
-Darren