Batch Editing RAD Grid Validation not working

2 posts, 0 answers
  1. Rahul
    Rahul avatar
    27 posts
    Member since:
    Jul 2015

    Posted 19 Feb Link to this post

     H,

    Telerik Team,

     

    I am facing validation related problem in Rad Grid (Batch Editing). It seems that validation is not working as expected .Please help me on the same.

    My current telerik verion is '2015.2.826.45'. Please let me know whether this version supports validation or need to update it to never version .

     

    <telerik:RadGrid ID="AddMeterReadingRadGrid" GridLines="None" runat="server" Width="99.3%" PageSize="10"
                    AutoGenerateColumns="False"
                    AllowAutomaticInserts="True"
                    AllowAutomaticDeletes="True"
                    AllowAutomaticUpdates="True"
                    AllowSorting="false"
                    AllowPaging="True"
                    OnPreRender="AddMeterReadingRadGrid_PreRender"
                    OnNeedDataSource="AddMeterReadingRadGrid_NeedDataSource"
                    OnBatchEditCommand="AddMeterReadingRadGrid_BatchEditCommand"
                    OnPageIndexChanged="AddMeterReadingRadGrid_PageIndexChanged"
                    OnPageSizeChanged="AddMeterReadingRadGrid_PageSizeChanged"
                    
                    >
                    <MasterTableView CommandItemDisplay="TopAndBottom" HorizontalAlign="NotSet" EditMode="Batch" AutoGenerateColumns="False" CommandItemSettings-ShowRefreshButton="false" ValidateRequestMode="Enabled" >
                        <BatchEditingSettings EditType="Row" />
                        <Columns>
                            <telerik:GridBoundColumn DataField="AssetNumber" HeaderStyle-Width="15%" HeaderText="Asset Number" UniqueName="AssetNumber" ItemStyle-Width="10%" ColumnValidationSettings-EnableRequiredFieldValidation="true">
                                <ColumnValidationSettings EnableRequiredFieldValidation="true" EnableModelErrorMessageValidation="true">
                                    <RequiredFieldValidator ForeColor="Red" ErrorMessage="*Required" Display="Static" SetFocusOnError="true">
                                    </RequiredFieldValidator>
                                    <ModelErrorMessage SetFocusOnError="true" />
                                </ColumnValidationSettings>
                            </telerik:GridBoundColumn>
                            <telerik:GridTemplateColumn UniqueName="OrganizationName" HeaderText="Organization" DataField="Organization" HeaderStyle-Width="10%">
                                <ItemTemplate>
                                    <%#Eval("Organization") %>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadComboBox runat="server" ID="OrganizationRadComboBox" Width="100px">
                                    </telerik:RadComboBox>
                                    <asp:RequiredFieldValidator ForeColor="Red" ControlToValidate="OrganizationRadComboBox" runat="server" ErrorMessage="*Required" Display="Static"></asp:RequiredFieldValidator>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridDateTimeColumn UniqueName="Date" PickerType="DatePicker" HeaderText="Date" HeaderStyle-Width="14%" DataField="TransactionDate" DataFormatString="{0:MM/dd/yyyy}" DataType="System.DateTime">
                                <ColumnValidationSettings EnableRequiredFieldValidation="true">
                                    <RequiredFieldValidator ForeColor="Red" Text="*Required" Display="Static">
                                    </RequiredFieldValidator>
                                </ColumnValidationSettings>
                            </telerik:GridDateTimeColumn>
                            <telerik:GridDateTimeColumn UniqueName="Time" PickerType="TimePicker" HeaderText="Time" HeaderStyle-Width="14%" DataField="TransactionTime" DataType="System.DateTime" DataFormatString="{0:HH:MM}">
                                <ColumnValidationSettings EnableRequiredFieldValidation="true">
                                    <RequiredFieldValidator ForeColor="Red" Text="*Required" Display="Static">
                                    </RequiredFieldValidator>
                                </ColumnValidationSettings>
                            </telerik:GridDateTimeColumn>
                            <telerik:GridTemplateColumn UniqueName="MeterReading" HeaderText="Meter Reading" HeaderStyle-Width="10%" DataField="MeterReading">
                                <ItemTemplate>
                                    <%#Eval("MeterReading") %>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadNumericTextBox runat="server" ID="radNumericTextBox" MinValue="0" NumberFormat-DecimalDigits="0" MaxValue="2147483647" Width="200px">
                                    </telerik:RadNumericTextBox>
                                    <asp:RequiredFieldValidator ForeColor="Red" ControlToValidate="radNumericTextBox" runat="server" ErrorMessage="*Required" Display="Static"></asp:RequiredFieldValidator>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Meter Type" DataField="MeterTypeID" HeaderStyle-Width="9%" UniqueName="MeterTypeName">
                                <ItemTemplate>
                                    <%#Eval("MeterTypeID") %>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadComboBox runat="server" ID="MeterTypeRadComboBox" AllowCustomText="true" Width="100px">
                                    </telerik:RadComboBox>
                                    <asp:RequiredFieldValidator ForeColor="Red" ControlToValidate="MeterTypeRadComboBox" runat="server" ErrorMessage="*Required" Display="Static"></asp:RequiredFieldValidator>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Errors/Warnings" HeaderStyle-Width="14%" ItemStyle-ForeColor="Red" UniqueName="Error">
                                <ItemTemplate>
                                    <%#Eval("Error")%>
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridButtonColumn HeaderText="Delete" HeaderStyle-Width="4%" ButtonType="ImageButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                            </telerik:GridButtonColumn>
                        </Columns>
                    </MasterTableView>
                    <ClientSettings AllowKeyboardNavigation="true">
                        <%--<ClientEvents OnRowCreating="OnRowCreating" />--%>
                    </ClientSettings>
                </telerik:RadGrid>

     

    Thanks in advance.

  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 23 Feb Link to this post

    Hello Rahul,

    It seems your question is not related to the Telerik Platform but to another product. Therefore, I would suggest you to post it under the respective forum category. In case the  inquiry is related to RadGrid for asp.net ajax, you can check the UI for ASP.NET AJAX forum section.

    Regards,
    Dimitrina
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top