Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > RadControls in DotNetNuke > GridTemplateColumn doesn't appear in the RadGrid Data(pdf or excel or any) Export..

Not answered GridTemplateColumn doesn't appear in the RadGrid Data(pdf or excel or any) Export..

Feed from this thread
  • Manish Mishra avatar

    Posted on Jan 17, 2012 (permalink)

    I have a radGrid, which has multiple columns.
    one of the columns is defined in this fashion:

    <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Name" HeaderStyle-Width="15%" 
    SortExpression="Name" UniqueName="Name">
    <ItemTemplate><table class="myTable">
    <tr>
       <td>
          <a href='<%# DetailPageUrl + "?id="+Eval("Id") %>'>
           <%# Eval("Name") %>
         </a>
       </td>
    </tr>
    </table>
    </ItemTemplate>
    </telerik:GridTemplateColumn>

    and then there are other columns defined in this fashion:
    <telerik:GridBoundColumn DataField="Model" HeaderText="Model" HeaderStyle-Width="15%" UniqueName="Model">
    </telerik:GridBoundColumn>

    columns defined in former style, don't appear in export but those defined as later do.

    Please help...........

    Reply

  • Andrey Andrey admin's avatar

    Posted on Jan 18, 2012 (permalink)

    Hi,

    Have you set the ExportOnlyData property to True? As the value in the ItemTemplate is passed to a control, this value along with the control won't be exported if the aforementioned property is set to true.

    Try setting the ExportOnlyData property to False and check whether this is the expected behavior.

    All the best,
    Andrey
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now

    Reply

  • Pierre avatar

    Posted on Feb 8, 2012 (permalink)

    That doesn't work. It only made the heading show as if they were hyperlinks

    Reply

  • Andrey Andrey admin's avatar

    Posted on Feb 9, 2012 (permalink)

    Hello,

    Try changing your GridTemplateColumn declaration as follows:

    <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Name" HeaderStyle-Width="15%"
    SortExpression="Name" UniqueName="Name">
    <ItemTemplate><table class="myTable" style="width: 170px">
    <colgroup>
        <col />
    </colgroup>
    <tr>
       <td>
          <a href='<%# DetailPageUrl + "?id="+Eval("Id") %>'>
           <%# Eval("Name") %>
         </a>
       </td>
    </tr>
    </table>
    </ItemTemplate>
    </telerik:GridTemplateColumn>

    Give this suggestion a try and check whether this is the desired behavior.

    Regards,
    Andrey
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > RadControls in DotNetNuke > GridTemplateColumn doesn't appear in the RadGrid Data(pdf or excel or any) Export..