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

RadGrid before insert/update validate

2 Answers 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mahendra
Top achievements
Rank 1
Mahendra asked on 29 Oct 2012, 06:29 AM
Hello experts

i am not understanding where i am wrong please help me ....

i have a radgrid and i need to validate designed control.
am using
<ValidationSettings EnableValidation="true" CommandsToValidate="Update, PerformInsert" ValidationGroup="EditMode />

 <EditItemTemplate>
                                        <telerik:RadDatePicker ID="dtTravelDate" DateInput-DateFormat="MM/dd/yyyy" DateInput-DisplayDateFormat="MM/dd/yyyy"
                                            DbSelectedDate='<%# Eval("Travel_Date") %>' runat="server" CssClass="ClaimDateControl"
                                            Width="100px">
                                        </telerik:RadDatePicker>
                                        <asp:RequiredFieldValidator ID="reqTravelDate" runat="server" ControlToValidate="dtTravelDate"
                                            ErrorMessage="Please Enter Travel Date." Display="None"  ValidationGroup="EditMode"> </asp:RequiredFieldValidator>
                                    </EditItemTemplate>
and so on

and end of the template am using validation summary.

<asp:ValidationSummary ID="summuryEdit" runat="server" ShowMessageBox="true" ShowSummary="false" Enabled="true" ValidationGroup="EditMode"  EnableClientScript="true"/>

please help me its very urgent ...

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 29 Oct 2012, 08:45 AM
Hi,

Try modifying the code as shown below.
aspx:
<telerik:RadDatePicker ID="dtTravelDate" DateInput-DateFormat="MM/dd/yyyy" DateInput-DisplayDateFormat="MM/dd/yyyy" runat="server" CssClass="ClaimDateControl" DbSelectedDate='<%# Bind("Travel_Date") %>'     Width="100px">
</telerik:RadDatePicker>
<asp:RequiredFieldValidator ID="reqTravelDate" runat="server" ControlToValidate="dtTravelDate"  ErrorMessage="Please Enter Travel Date."  >

Thanks,
Shinu.
0
Mahendra
Top achievements
Rank 1
answered on 29 Oct 2012, 01:17 PM
i have tried but is not helping me

i have also try to enableclientScript to true ... is also not working me.
can any buddy help me ?
Tags
Grid
Asked by
Mahendra
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Mahendra
Top achievements
Rank 1
Share this question
or