Hi there,
I am trying to exportToPDF in a radgrid. It seems to work fine except for a gridtemplatecolumn i have which contains another radgrid.
So basically, each row has a column which contains a grid containing a list of strings (they are validation msg's).
I have found a few threads telling me to enable the viewstate for the grid, and also, to ExportOnlyData="false", which has no affect.
Everything else seems to work fine, except the exporting.
thanks in advance!
Neil
below is the code:
I am trying to exportToPDF in a radgrid. It seems to work fine except for a gridtemplatecolumn i have which contains another radgrid.
So basically, each row has a column which contains a grid containing a list of strings (they are validation msg's).
I have found a few threads telling me to enable the viewstate for the grid, and also, to ExportOnlyData="false", which has no affect.
Everything else seems to work fine, except the exporting.
thanks in advance!
Neil
below is the code:
<telerik:RadGrid id="rgdListLicences" runat="server" Width="100%" OnNeedDataSource="rgdListLicences_NeedDataSource" GridLines="None" Skin="eLicensing_paging" EnableEmbeddedSkins="false" EnableViewState="true"> <ExportSettings IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="false" > <Pdf PageHeight="210mm" AllowPrinting="true" PageWidth="297mm" PageTitle="Print Validations" DefaultFontFamily="Arial Unicode MS" PageBottomMargin="20mm" PageTopMargin="20mm" PageLeftMargin="20mm" PageRightMargin="20mm" /> </ExportSettings> <MasterTableView RetrieveAllDataFields="false" CommandItemDisplay="Top" AutoGenerateColumns="false" > <CommandItemTemplate> <telerik:radbutton ID="DownloadPDF" AutoPostBack="true" CssClass="pdfButton" runat="server" Width="10%" Text="Print Validations" CommandName="ExportToPdf"/> </CommandItemTemplate> <Columns> <telerik:GridBoundColumn DataField="clientRef" DataFormatString="{0:dd/MM/yy}" HeaderText="Client Ref"><ItemStyle Width="12%" VerticalAlign="Top" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ServiceName" HeaderText="Service Name"><ItemStyle Width="28%" VerticalAlign="Top" /> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="commencementDate" DataFormatString="{0:dd/MM/yy}" HeaderText="Start Date"><ItemStyle Width="12%" VerticalAlign="Top" /> </telerik:GridBoundColumn> <telerik:GridTemplateColumn UniqueName="validations" HeaderText="Validations" SortExpression="CompanyName" > <ItemTemplate> <telerik:radgrid ID="rgdValidations" OnNeedDataSource="rgdValidations_NeedDataSource" BorderStyle="None" ShowHeader="false" runat="server" EnableViewState="true" > <MasterTableView> <ItemStyle Font-Size="Smaller" /> <AlternatingItemStyle Font-Size="Smaller"/> </MasterTableView> </telerik:radgrid> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid>Protected Sub rgdValidations_NeedDataSource(ByVal sender As Object, ByVal e As GridNeedDataSourceEventArgs) Dim RadGrid2 As RadGrid = CType(sender, RadGrid) Dim item As GridDataItem = RadGrid2.NamingContainer Dim validations As List(Of String) = CType(item.DataItem, LicencesLicence).validations RadGrid2.DataSource = validationsEnd Sub