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

Exporting Linkbutton in radgrid template column

3 Answers 136 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pradip
Top achievements
Rank 1
Pradip asked on 25 Nov 2014, 05:04 PM
<telerik:GridTemplateColumn>
                <ItemTemplate>
                    <asp:LinkButton ID="lnkb" runat="server" Text='<%# Eval("Count") %>' CommandName="Count""></asp:LinkButton>
                </ItemTemplate>
             </telerik:GridTemplateColumn>

When i export into word, its showing blank data column in word document.

any solution ?

3 Answers, 1 is accepted

Sort by
0
Kostadin
Telerik team
answered on 28 Nov 2014, 08:37 AM
Hi Pradip,

In order to export a TemplateColumn data in a Word document you have to set ExportOnlyData to false.

Regards,
Kostadin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Pradip
Top achievements
Rank 1
answered on 28 Nov 2014, 09:31 AM
Hello Kostadin,

Thanks for your reply. I have already tried with that but its not working

 if(e.CommandName==RadGrid.ExportToWordCommandName)
            {
                grdApplicationMachines.ExportSettings.ExportOnlyData = false;
            }

Its return HTML data code like

                    <a
onclick="highlightRow(this.id);"
id="ctl00_CP_Tech_ApplicationMain_Tech_ApplicationMachines_grdApplicationMachines_ctl00_ctl04_lnkbProcessCount"
href="javascript:__doPostBack(&#39;ctl00$CP$Tech_ApplicationMain$Tech_ApplicationMachines$grdApplicationMachines$ctl00$ctl04$lnkbProcessCount&#39;,&#39;&#39;)">1</a>

                </td>

      </tr><tr>

Thanks,
Pradip
0
Kostadin
Telerik team
answered on 03 Dec 2014, 08:39 AM
Hi Pradip,

I prepared  a small sample where you can see that the TemplateColumn is exported correctly when ExportOnlyData is set to false. Could you please let me know which version of Telerik UI for ASP.NET you are using?


Regards,
Kostadin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Pradip
Top achievements
Rank 1
Answers by
Kostadin
Telerik team
Pradip
Top achievements
Rank 1
Share this question
or