Hi, i need show the print preview of one Grid Hierarchy, i find some examples but only show the first level. When HierarchyChildTemplate is open in the grid not show the others levels...
How can show the print preview with HierarchyChildTemplate expanded?...
thanks..
Add picture...
How can show the print preview with HierarchyChildTemplate expanded?...
thanks..
Add picture...
4 Answers, 1 is accepted
0
Accepted
Hello Darky,
before the "StyleManager.SetTheme(grid, StyleManager.GetTheme(grid));" line.
Greetings,
Yavor Georgiev
the Telerik team
If you wish to print the grid hierarchy (assuming you're using PrintExtensions.cs from our demos), you should modify the ToPrintFriendlyGrid method to insert:
grid.HierarchyChildTemplate = source.HierarchyChildTemplate;
foreach
(var definition
in
source.ChildTableDefinitions)
{
grid.ChildTableDefinitions.Add(definitions);
}
grid.ExpandAllHierarchyItems();
Greetings,
Yavor Georgiev
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
Darky
Top achievements
Rank 1
answered on 15 Sep 2010, 02:24 PM
Thank you for your reply. It works fine...
0
Sureshbabu
Top achievements
Rank 1
answered on 07 Jan 2016, 07:54 PM
Hi Yavor Georgiev,
I do have the same issue. Even after inserting the grid.ExpandAllHierarchyItems(); code I am not able to see the Child elements of the Hierarchical Items. Is there anything I am missing? Please help.
0
Hello Sureshbabu,
Unfortunately, the approach discussed in the current thread is no longer available for print previewing hierarchical RadGridView as advised in the following thread - RadGridView Print and Print Preview. I need to inform you that there is no out of the box implementation that you can use in order to achieve the desired behavior and you will need to come up with a custom logic from your side. I suggest you review the following demo - RadGridView Export and Print through RadDocument - which you can find in our demo application - http://demos.telerik.com/wpf/.
I have created a sample project, based on the demo, that implements some custom logic on exporting the expanded child grids, however, the approach is not generic and I am sending it just for your reference. Once you have reviewed it you can consider implementing something similar in your project.
If you have any further questions or concerns, do not hesitate to contact us.
Regards,
Stefan Nenchev
Telerik
Unfortunately, the approach discussed in the current thread is no longer available for print previewing hierarchical RadGridView as advised in the following thread - RadGridView Print and Print Preview. I need to inform you that there is no out of the box implementation that you can use in order to achieve the desired behavior and you will need to come up with a custom logic from your side. I suggest you review the following demo - RadGridView Export and Print through RadDocument - which you can find in our demo application - http://demos.telerik.com/wpf/.
I have created a sample project, based on the demo, that implements some custom logic on exporting the expanded child grids, however, the approach is not generic and I am sending it just for your reference. Once you have reviewed it you can consider implementing something similar in your project.
If you have any further questions or concerns, do not hesitate to contact us.
Regards,
Stefan Nenchev
Telerik
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 Feedback Portal and vote to affect the priority of the items