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

How do I add validation summary to grid with EditItemTemplate

1 Answer 70 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
moegal asked on 17 Oct 2014, 12:35 PM
I just have a basic editable grid with EditMode of EditForms.

All of the validation works for each item but I would like a rad modal pop up notification of the summary or even a message saying some fields are not correct.

I have tried several example from the forums with no luck. I've added it on itemcreated, and manully, and even above the grid.  Just does not seem to work.

A typical column looks like this:

<telerik:GridTemplateColumn HeaderText="*Address" UniqueName="address" DataField="address"
                                    <asp:Label ID="lbladdress" runat="server" Text='<%# Eval("address") %>'></asp:Label>
                                    <telerik:RadTextBox ID="txbaddress" Width="300px" runat="server"
                                        Text='<%# Eval("address") %>'>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator_address" runat="server" ControlToValidate="txbaddress"
                                        ErrorMessage="Required" Text="*"></asp:RequiredFieldValidator>
                                <ItemStyle VerticalAlign="Top"></ItemStyle>

help would be great!


1 Answer, 1 is accepted

Sort by
Angel Petrov
Telerik team
answered on 22 Oct 2014, 07:34 AM
Hello Marty,

Thank you for contacting us.

In order to achieve the desired goal you can include a ValidationSummary control on the page and place it inside a modal popup or RadWindow. Once this is done you will need to show the popup/RadWindow when update is triggered and the validation fails.

In attachments you can find a sample website that I have assembled for you to review. It illustrates a possible realization of such a scenario and seems to behave as expected on my end. Please examine the implementation, try applying the same approach on your end and let us know if further questions regarding this matter arise.

Angel Petrov

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Asked by
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Share this question