This is a migrated thread and some comments may be shown as answers.

Why does RadGrid keep insisting on inserting this line??

3 Answers 27 Views
Grid
This is a migrated thread and some comments may be shown as answers.
matt
Top achievements
Rank 1
matt asked on 04 Oct 2010, 06:25 PM

CommandItemSettings

 

 

ExportToPdfText="Export to Pdf"

 



Whenever I use the designer it keeps putting that in..

Furthermore.. Id actually like that functionality
<telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="EntityDataSource1" AutoGenerateEditColumn="True"
           Width="500px" OnUpdateCommand="RadGrid1_UpdateCommand" OnInsertCommand="RadGrid1_InsertCommand"
           AutoGenerateColumns="False" AllowFilteringByColumn="True" AllowPaging="True"
           AllowSorting="True" GridLines="None" ShowGroupPanel="True">
           <ClientSettings AllowDragToGroup="True">
           </ClientSettings>
           <MasterTableView DataSourceID="EntityDataSource1" DataKeyNames="OrgID" CommandItemDisplay="Top">
               <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
               <Columns>
                   <telerik:GridBoundColumn DataField="OrgID" HeaderText="OrgID" ReadOnly="True" SortExpression="OrgID"
                       UniqueName="OrgID" DataType="System.Int32" Visible="false">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="OrgName" HeaderText="OrgName" SortExpression="OrgName"
                       UniqueName="OrgName">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="Address" HeaderText="Address" SortExpression="Address"
                       UniqueName="Address" Visible="false">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City"
                       UniqueName="City">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="State" HeaderText="State" SortExpression="State"
                       UniqueName="State">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="Zip" HeaderText="Zip" SortExpression="Zip" UniqueName="Zip"
                       Visible="false">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="Phone" HeaderText="Phone" SortExpression="Phone"
                       UniqueName="Phone" Visible="false">
                   </telerik:GridBoundColumn>
                   <telerik:GridBoundColumn DataField="Fax" HeaderText="Fax" SortExpression="Fax" UniqueName="Fax"
                       Visible="false">
                   </telerik:GridBoundColumn>
               </Columns>
           </MasterTableView>
       </telerik:RadGrid>
       <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=G3TEntities"
           DefaultContainerName="G3TEntities" EnableFlattening="False" EnableInsert="True"
           EntitySetName="Orgs" EnableUpdate="True">
       </asp:EntityDataSource>
but I don't see any 'Export to PDF' on my radgrid.. what else do I need to add?

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 04 Oct 2010, 09:28 PM
Hello Matt,

The aforementioned property is serialized (intentionally) in order to address a localization-related issue. You can safely ignore it - please excuse us for any inconvenience caused.

As to the second question - You can enable the desired buttons this way:
<MasterTableView CommandItemDisplay="Top">
    <CommandItemSettings ShowExportToCsvButton="true"
        ShowExportToPdfButton="true"
        ShowExportToExcelButton="true"
        ShowExportToWordButton="true" />
</MasterTableView>

Kind regards,
Daniel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
matt
Top achievements
Rank 1
answered on 07 Oct 2010, 02:54 PM
All the exports seem to work except the PDF.. Any idea what this is about ? 

 

Server Error in '/' Application.

The '*' character, hexadecimal value 0x2A, cannot be included in a name.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Xml.XmlException: The '*' character, hexadecimal value 0x2A, cannot be included in a name.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[XmlException: The '*' character, hexadecimal value 0x2A, cannot be included in a name.]
   System.Xml.ValidateNames.ThrowInvalidName(String s, Int32 offsetStartChar, Int32 offsetBadChar) +278
   System.Xml.ValidateNames.ParseQNameThrow(String s, String& prefix, String& localName) +4006407
   System.Xml.Xsl.Runtime.XmlQueryRuntime.ParseTagName(String tagName, Int32 idxPrefixMappings, String& prefix, String& localName, String& ns) +21
   System.Xml.Xsl.Runtime.XmlQueryOutput.WriteStartAttributeComputed(String tagName, Int32 prefixMappingsIndex) +55
   <xsl:template name="process-style">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current, IList`1 style) +1723
   <xsl:template match="html:div">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +572
   <xsl:template match="html:div">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +872
   <xsl:template name="process-table-cell">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +6272
   <xsl:template match="html:td">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +114
   <xsl:template name="process-common-attributes-and-children">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +122
   <xsl:template match="html:tr">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +106
   <xsl:template name="process-table">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +7586
   <xsl:template match="html:table">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +125
   <xsl:template name="process-table-cell">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +6272
   <xsl:template match="html:td">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +114
   <xsl:template name="process-common-attributes-and-children">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +122
   <xsl:template match="html:tr">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +106
   <xsl:template name="process-common-attributes-and-children">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +122
   <xsl:template match="html:tfoot">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +114
   <xsl:template name="process-table">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +7220
   <xsl:template match="html:table">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +125
   <xsl:template match="html:body">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +2681
   <xsl:template match="html:html">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current) +186
   <xsl:apply-templates>(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator ) +12119
   Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) +91
   Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime) +28
   System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results) +88
   System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer) +130
   System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, XmlWriter results, XmlResolver documentResolver) +58
   System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, TextWriter results) +83
   Telerik.Web.UI.Grid.Export.TableViewExporter.PdfExportRenderForm(HtmlTextWriter nullWriter, Control form) +1690
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +
0
Daniel
Telerik team
answered on 12 Oct 2010, 09:29 PM
Hello Matt,

This problem is probably caused by RadComboBox which uses a special CSS style that is not supported by the PDF engine. Can you please set ExportOnlyData to true? Alternatively you can try to set the pager style to numeric.
PDF export
Pager item

Let me know if the problem still persists.

Regards,
Daniel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
matt
Top achievements
Rank 1
Answers by
Daniel
Telerik team
matt
Top achievements
Rank 1
Share this question
or