I have a radgid that has a button for each export. (csv,xls,word,pdf) They are all set up the same and they all work except for the csv one. The CSV is only exporting the headers not the data. It used to work and nothing has changed that has anything to do with the export but now it is not working. I have tried the following steps. Rebooted my machine and restarted VS and i have also rerefrenced Telerik.Web.UI.dll and it is still only giving me "MenuId","MenuPageKey","MenuHeader","MenuLinkText","MenuLink","MenuSortOrder","MenuView","MenuHeaderSortOrder"
PDF word and excel all give me full data
below is my radgrid code and the code for the exports.
Thank you for your help
PDF word and excel all give me full data
below is my radgrid code and the code for the exports.
<telerik:RadGrid ID="RadGrid1" OnSortCommand="RadGrid1_SortCommand" OnPageIndexChanged="RadGrid1_PageIndexChanged" OnNeedDataSource="RadGrid1_NeedDataSource" |
AllowSorting="True" PageSize="15" AllowPaging="True" runat="server" EnableEmbeddedSkins="false" |
Skin="EasyEcomm" AutoGenerateColumns="true" ExportSettings-ExportOnlyData="false" ExportSettings-FileName="SqlExport" |
ExportSettings-OpenInNewWindow="true"> |
<PagerStyle Mode="Slider" /> |
<ClientSettings EnableRowHoverStyle="true"> |
</ClientSettings> |
</telerik:RadGrid> |
<asp:Label ID="SqlStatementLabel" runat="server" Text=""></asp:Label><br /> |
<div class="bottom_left_div" runat="server" id="ButtonsDiv"> |
<br /> |
<asp:Button ID="BackButton" runat="server" Text="<< Back" OnClick="BackButton_Click" /><asp:Button |
ID="ExportCSVButton" runat="server" Text="Export to CSV" OnClick="ExportCSVButton_Click" /> |
<asp:Button |
ID="ExportXLSButton" runat="server" Text="Export to XLS" OnClick="ExportXLSButton_Click" /> |
<asp:Button |
ID="ExportWRDButton" runat="server" Text="Export to Word" OnClick="ExportWRDButton_Click" /> |
<asp:Button |
ID="ExportPDFButton" runat="server" Text="Export to PDF" OnClick="ExportPDFButton_Click" /> |
</div> |
protected void ExportCSVButton_Click(object sender, EventArgs e) |
{ |
RadGrid1.MasterTableView.AllowPaging = false; |
RadGrid1.MasterTableView.Rebind(); |
RadGrid1.ExportSettings.IgnorePaging = true; |
RadGrid1.MasterTableView.ExportToCSV(); |
} |
protected void ExportXLSButton_Click(object sender, EventArgs e) |
{ |
RadGrid1.MasterTableView.AllowPaging = false; |
RadGrid1.MasterTableView.Rebind(); |
RadGrid1.ExportSettings.IgnorePaging = true; |
RadGrid1.MasterTableView.ExportToExcel(); |
} |
protected void ExportWRDButton_Click(object sender, EventArgs e) |
{ |
RadGrid1.MasterTableView.AllowPaging = false; |
RadGrid1.MasterTableView.Rebind(); |
RadGrid1.ExportSettings.IgnorePaging = true; |
RadGrid1.MasterTableView.ExportToWord(); |
} |
protected void ExportPDFButton_Click(object sender, EventArgs e) |
{ |
RadGrid1.ExportSettings.Pdf.PageHeight = Unit.Parse("162mm"); |
RadGrid1.ExportSettings.Pdf.PageWidth = Unit.Parse("600mm"); |
RadGrid1.MasterTableView.AllowPaging = false; |
RadGrid1.MasterTableView.Rebind(); |
RadGrid1.ExportSettings.IgnorePaging = true; |
RadGrid1.MasterTableView.ExportToPdf(); |
} |
Thank you for your help