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

RadGrid export problem

1 Answer 54 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Parag
Top achievements
Rank 1
Parag asked on 08 Aug 2008, 08:55 AM
I am trying to export the contents of the radgrid in a csv file using the function

 ProductSplitGrid.MasterTableView.ExportToCSV();

However the csv file is only printing the GridBoundColumn like this below.

  <telerik:GridBoundColumn UniqueName="PL2" DataField="ProductLevel2" DataType="System.Int32" Visible="true" AllowFiltering="false" ItemStyle-Width="15%" HeaderText="Product Level 2">
                            <ItemStyle Width="8%"></ItemStyle>
                            </telerik:GridBoundColumn>


It is unable to print any GridTemplateColumn like this below:
 <telerik:GridTemplateColumn  UniqueName="Ship To" HeaderText="Customer" Visible="True" AllowFiltering="false" ItemStyle-Width="8%">
                              <ItemTemplate>
                              <telerik:RadComboBox ID="comboShipToID" runat="server" Width="250px" Height="200px"
                                   AllowCustomText="True" ShowToggleImage="True" ShowMoreResultsBox="true"
                                   EnableLoadOnDemand="True" MarkFirstMatch="True" OnItemsRequested="comboShipToID_ItemsRequested"
                                   Skin="WebBlue" EnableVirtualScrolling="true">
                              </telerik:RadComboBox>
                              </ItemTemplate>     
                              <ItemStyle Width="8%"></ItemStyle>
                          </telerik:GridTemplateColumn> 



Could anybody help me in this regard.

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 08 Aug 2008, 10:02 AM
Hello Parag,

In order to export the content from the templates columns in your grid, consider adding hidden bound columns with the same content and switch the visibility of the template columns with those bound columns prior to the export operation. Further details on this approach you can find here.

Best regards,
Stephen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Parag
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or