RadGrid Export To Excel

2 posts, 0 answers
  1. Rasool
    Rasool avatar
    15 posts
    Member since:
    Mar 2015

    Posted 10 May 2015 Link to this post

    Hi

    Dear

     I have a grid with template column (item template and edit template) and i use required validation (client side) in item template because it is radtextbox, when export to excel, these fields have '*' in excel file .Why?

     <telerik:GridTemplateColumn FilterControlWidth="70%" AutoPostBackOnFilter="true" DataField="Shomaresh"
                            HeaderStyle-Width="100px" HeaderText="<%$ Resources:Resource, Shomaresh %>"
                            UniqueName="Shomaresh">
                            <ItemTemplate>
                                <telerik:RadNumericTextBox Width="100%"  runat="server" ID="rtxt_Shomaresh" Text='<%# Bind("Shomaresh") %>'>
                                </telerik:RadNumericTextBox>
                                <asp:RequiredFieldValidator ID="RFV_Shomaresh" runat="server" ErrorMessage="<%$ Resources:Resource, Shomaresh %>" Text="*" ValidationGroup="AnbarGardani" ControlToValidate="rtxt_Shomaresh" ForeColor="Red"></asp:RequiredFieldValidator>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <telerik:RadNumericTextBox Width="100%" runat="server" ID="rtxt_Shomaresh" Text='<%# Bind("Shomaresh") %>'>
                                </telerik:RadNumericTextBox>
                                <asp:RequiredFieldValidator ID="RFV_Shomaresh" runat="server" ErrorMessage="<%$ Resources:Resource, Shomaresh %>" Text="*" ValidationGroup="AnbarGardani" ControlToValidate="rtxt_Shomaresh" ForeColor="Red"></asp:RequiredFieldValidator>
                            </EditItemTemplate>
                        </telerik:GridTemplateColumn>

    I think this problem comes from required validator in item template.Other template columns that are not validator ,dont have this problem.

    Please help.

     Thanks.

     

  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 13 May 2015 Link to this post

    Hello Rasool,

    Note that you do not actually need RequiredFieldValidator in the ItemTemplate as it content only renders when the RadGrid is not in edit mode and the input there is not editable. You need the validator control only in the EditItemTemplate.
    Pease try to remove the RequiredFieldValidator form the ItemTemplate and see how it goes.

    Regards,
    Maria Ilieva
    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