I am using NestedView grid. It is having the the feature of ExportPDF. So i added export button inside the CommandItemTemplate.
I firmly need a formatted PDF ouptut, so as per the Telerik direaction i used ItemCreated Event to set up the formatting styles for exporting based on the true flag set inside the ItemCommand event when i called export button.
Normally when i click the export button the grid has to fire the ItemCreated event then need to fire ItemCommand event again it return back to ItemCreated event . so that only i can set the flag in ItemCommand event that helps to form the PDF file output in the Itemcreated event.
But in my Nested grid the Itemcreated event firing first and then ItemCommand event fires but finally it never return back to Itemcreated event . As a result of these i could not set the flag so that could not format the PDF out put.
So guide me to solve the scenario...
-Thanks
5 Answers, 1 is accepted
Anybody hav the knolwlge of my above issue or guide me formatting of PDF output file in Nested grid
-Thanks
Hi,
Anybody have the knowledge in exporting pdf with NestedViewTemplate grid, please direct me the following scenarios
1)Exporting the grid with the nested grid data if it is expanded.
I am getting the collowing error when i try to do it
"The '*' character, hexadecimal value 0x2A, cannot be included in a name. "
2) I am not finding the way to apply styles to exported pdf file. I could not able to call ItemCreated event after ItemCommand event. Because i am following the scenario as the Telerik team directed for normal grid. But fails to achieve in NestedGrid
3) I am facing the problem in suppose i call the styles related code inside the export button click event directly. I am getting the following related error after applying font style to header template
System.NullReferenceException: Object reference not set to an instance of an object.
at Telerik.Web.Apoc.Render.Pdf.Fonts.Type2CIDSubsetFont.get_WArray()
at Telerik.Web.Apoc.Pdf.PdfFontCreator.CreateCIDFont(String pdfFontID, Font font, CIDFont cidFont)
at Telerik.Web.Apoc.Pdf.PdfFontCreator.MakeFont(String pdfFontID, Font font)
at Telerik.Web.Apoc.Pdf.FontSetup.AddToResources(PdfFontCreator fontCreator, PdfResources resources)
at Telerik.Web.Apoc.Render.Pdf.PdfRenderer.StopRenderer()
at Telerik.Web.Apoc.StreamRenderer.StopRenderer()
at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)
So please guide me to achieve the above related scenario for exporting PDF in nested grid
-Thanks
Straight to your questions
1) Please set ExportOnlyData="true" to avoid this error.
<ExportSettings ExportOnlyData="true" /> <MasterTableView ...2) I recommend you examine our PDF-related resources.
PDF export help topic
Export to PDF online demo
3) As I mentioned in another forum thread, I need a sample project to reproduce and debug the error on my end.
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.
Thanks for your respone at first. I used this property
<ExportSettings ExportOnlyData="true" /> in both design side section and code side section. I viewed the links given by you already.It has been helping me a lot for ordinary grid.
But as per the above code, i meant to express the scenario of exorting the data of both nestedGrid and parentgrid and formatting the styles section while exporting.
I have ParentGrid and nestedgrid which is under NestedViewTemplate section. I am using the scenario as per the demostration given by the below link
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx
Hope you could understand my need as well now
-Thanks
Unfortunately it is not possible to export RadGrid in such complicated scenarios. I created a stripped version of the aforementioned demo that demonstrates that there is no problem to export hierarchical RadGrids residing in NestedViewTemplate of another RadGrid.
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.