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

Hyperlink data not exporting in csv file format

2 Answers 272 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jaichand
Top achievements
Rank 1
Jaichand asked on 23 Sep 2011, 08:23 AM
Hi,
I have used RadGrid and allow to export data in Excel, pdf, csv and word.
But the problem is that when ever we export data in csv file format. It doesn't export the hyperlink data. only export to non hyperlinked.
I want to inform you that  in Excel , pdf and word all the information are exporting with hyperlinked data. only problem with csv file.

 so please help me how to do that all my requirement that hyperlink data should be exported in csv file format.





Thanks & Regards
Jaichand

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Sep 2011, 12:30 PM
Hello Jaichand,

I suppose you are trying to export GridHyperLinkColumn data and set ExportOnlyData as true. In that case this is the expected behavior. The GridHyperlinkColumn in Telerik RadGrid have Hyperlink in their cells. They are not considered as data. One approach is to set that ExportOnlyData as false and hides the unwanted columns.

Thnaks,
Princy.
0
Jaichand
Top achievements
Rank 1
answered on 26 Sep 2011, 05:56 AM
Hi Princy,
Actually you didn't get my issue. My Problem is that I unable to export the hyperllink text of any grid column in csv format while other column are exporting.
I can export all column of grid  in all format except csv format. I need to export all columns of grid included hyperlink column also but the hyperlink column text is exporting  as blank while other column are exporting.

I want to show you my code that I want to ask about my problem.
please see the following code and let me know how can export item template of grid column that is hyperlink as Preview
<telerik:RadGrid ID="XYZ" runat="server" AllowPaging="True"  AllowSorting="True"
             ShowGroupPanel="true"
            EnableViewState="True" OnItemCreated="GridCaseList_ItemCreated" >
            <ExportSettings ExportOnlyData="True" OpenInNewWindow="true" Excel-Format="Html"
                Excel-FileExtension=".xslx" Csv-ColumnDelimiter="Comma" Csv-RowDelimiter="NewLine"
                Pdf-Title="Export">
           </ExportSettings>
            <MasterTableView DataKeyNames="abcId" ClientDataKeyNames="abcId" CommandItemDisplay="Top">
                <CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false"
                    ShowRefreshButton="false" ShowExportToCsvButton="true" ShowExportToWordButton="true"
                    ShowExportToPdfButton="true"/>
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <Columns>
                     
                    <telerik:GridTemplateColumn>
                        <ItemTemplate>
                            <a href="#" onclick="alert('test');">
                                Preview</a>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
            </MasterTableView>
  <ClientSettings AllowDragToGroup="true" AllowColumnsReorder="true">
                <Selecting AllowRowSelect="True" />               
            </ClientSettings>
            <GroupingSettings ShowUnGroupButton="false"/>
            <HeaderContextMenu EnableAutoScroll="True">
            </HeaderContextMenu>
        </telerik:RadGrid>




Thanks
Jaichand
Tags
Grid
Asked by
Jaichand
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Jaichand
Top achievements
Rank 1
Share this question
or