| If (Not RadGrid1.MasterTableView.Items.Count = 0) Then |
| With RadGrid1 |
| .ExportSettings.IgnorePaging = True |
| .ExportSettings.ExportOnlyData = True |
| .ExportSettings.FileName = "ExportedResult" |
| .MasterTableView.ExportToExcel() |
| End With |
| End If |
if i'll remove the line " ExportSettings.IgnorePaging = True" , it will work. but i need all the pages to be exported.
in aspx, i am used the code like bellow
| <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AutoGenerateColumns="true" |
| DataSourceID="sqlData1" EnableEmbeddedSkins="False" GridLines="None" |
| EnableAJAX="True" > |
| <HeaderContextMenu EnableTheming="True"> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| </HeaderContextMenu> |
| <MasterTableView DataSourceID="sqlData1" AllowFilteringByColumn="false" PageSize="50"> |
| <RowIndicatorColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </RowIndicatorColumn> |
| <ExpandCollapseColumn> |
| <HeaderStyle Width="20px"></HeaderStyle> |
| </ExpandCollapseColumn> |
| <Columns> |
| </Columns> |
| </MasterTableView> |
| <FilterMenu EnableTheming="True"> |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> |
| </FilterMenu> |
| </telerik:RadGrid> |
| <asp:SqlDataSource ID="sqlData1" runat="server" ConnectionString="<%$ ConnectionStrings:PAMMSConnectionString %>"> |
| </asp:SqlDataSource> |
My grid is creating Dynamically, thats why i used " AutoGenerateColumns="true" ". According to the query user gives , the grid will populate the data.
can you please help me out for this issue.
I've got a RadGrid that contains multiple DataList in a template column, most all the values are numeric, but not all. I can export to excel, and most everything is correct, however in my situation, I need different formats for the cells, depending on the datalist.
This is my export secion
| gv.ExportSettings.FileName = Format(Now(), "MMddyyyy") |
| gv.ExportSettings.IgnorePaging = True |
| gv.ExportSettings.ExportOnlyData = False |
| gv.ExportSettings.OpenInNewWindow = True |
| gv.ExportSettings.HideStructureColumns = True |
| gv.MasterTableView.ExportToExcel() |
| AddHandler gv.ExcelExportCellFormatting, AddressOf Me.gv_ExcelExportCellFormatting |
I can get the individual datalist in this event, but how do I apply a specific format to the Cells within the Datalist whenexported to Excel?
Hopefully I've provided enough info to get some assistance here, of not let me know and I'll try respond with additional info.
Thanks in Advance