Sample code: <asp:Button ID="Button1" runat="server" Text="Export" /> <telerik:RadGrid ID="RadGrid1" runat="server"> <ExportSettings OpenInNewWindow="true" /> </telerik:RadGrid> void RadGrid1_PdfExporting(object sender, Telerik.Web.UI.GridPdfExportingArgs e) { e.RawHTML = "<a href="absolute url to pdf file">dasdasdasdas</a>"; } protected void Button1_Click(object sender, EventArgs e) { RadGrid1.MasterTableView.ExportToPdf(); }
It would be nice if you provided the same level of documentation on server side programming as you do on client side programming. Specifically I suggest you include some documentation on finding and manipulating controls on the itemdatabound event. Currently the only source for this information is in your forums and most of it consists of try this, if that doesn't work than try that. This is very frustrating because server side programming on RadGrid is substantially different than in Microsoft Grid Control.
For reproducing this you need to set: RadGrid1.DataSource = null; Still when DataSource = new List<object>(); is set for DataSourse the RadGrid is successfully bound and does not throw errors.
I need to export data from grid without actually displaying the grid. When I drop grid on a aspx form, set datasource with stored procedure, one parameter linked to a drop box selected value, set some properties like export all pages, only data and then fire export to excel if I have grid visible property set to true it generates excel file with field names as headers. If I have grid visible property set to false excel file still generated but no field names added as column headers. Is it a correct behavior for the grid? I use 2013 Q3 version of Ajax .Net controls, VS2010, IE 9, Chrome. THanks!
The latest update of Chrome browser Version 33.0.1750.117 breaks the radgrid vertical scrolling with these settings: <ClientSettings AllowColumnHide="True" AllowKeyboardNavigation="True"> <Scrolling FrozenColumnsCount="1" UseStaticHeaders="True" AllowScroll="True" EnableVirtualScrollPaging="True" /> </ClientSettings>
When the grid has no paging and all the groups are collapsed its good to have a paging defined within grouping to display all the groups in the same page as well can browse through the items within the group with paging defined.
Add a new column type "AutoExpand", I have lots of grids where the number of columns changes dynamically but the width of each column is fixed, this means that the width of the grid data section changes and with only a few columns defined leave a big vertical space between the last data column and the grid right hand border. It would be great to be able to add a AutoExpand column as the last column in the grid to fill any remaining space between the end of the last data column and the grid righthand border. This will give you a consistant look regardless of how many columns are added.