It is fairly easy to export a radgrid content in various formats.
here is sample code:
<telerik:RadGrid ID="GridRaporListe" AllowFilteringByColumn="true" AutoGenerateColumns="false"
PageSize="10000" AllowPaging="True" AllowSorting="True" runat="server" ShowGroupPanel="false"
OnItemCreated="GridRaporListe_ItemCreated" AllowMultiRowSelection="true" ClientSettings-AllowColumnHide="True"
ClientSettings-AllowColumnsReorder="True">
<ClientSettings EnableRowHoverStyle="true">
<Selecting AllowRowSelect="False"></Selecting>
</ClientSettings>
<PagerStyle Mode="NextPrevAndNumeric" />
<GroupingSettings CaseSensitive="false" />
<MasterTableView TableLayout="Fixed" DataKeyNames="ID" CommandItemDisplay="TopAndBottom">
<CommandItemSettings ShowExportToExcelButton="true" ShowExportToPdfButton="true"
ShowExportToWordButton="true" ShowExportToCsvButton="true" ShowRefreshButton="false"
ShowAddNewRecordButton="false"></CommandItemSettings>
<Columns>
<telerik:GridBoundColumn HeaderText="OgretimYili" DataField="OgretimYili" UniqueName="OgretimYili"
SortExpression="OgretimYili" HeaderStyle-Width="100px" />
<telerik:GridBoundColumn HeaderText="Donem" DataField="Donem" UniqueName="Donem"
SortExpression="Donem" HeaderStyle-Width="100px" />
</Columns>
</MasterTableView>
<ExportSettings FileName="Rapor">
<Excel Format="Html"></Excel>
</ExportSettings>
<ClientSettings AllowDragToGroup="true">
</ClientSettings>
</telerik:RadGrid>
Hiç yorum yok:
Yorum Gönder