Print Parents And ExpandedChild Only in SfTreeGrid

I Want To Print  SftreeGrid data With Parent Data With Expanded Child data Only , Is there Any Way ???  I want To Print The View attached in Photo , eg :  In this picture john is  Expanded so I want print All parents  Including John's Childs , iF i didn't Expanded John I want To print Only Parent data  


1 Reply

DY Deivaselvan Y Syncfusion Team August 13, 2018 11:38 AM UTC

Hi Abbas,

Thank you for contacting Syncfusion support.

We do not have direct printing support in SfTreeGrid control. Printing feature can be achieved by exporting the TreeGrid to PDF and print the exported PDF using SfPdfViewer control. Now, We do not have direct support to exclude the child records from exporting if the child records are not expanded in Grid view. But you can achieve your requirement by overriding the ExportNodesToPdf method of TreeGridPdfConverter class. Please find the sample for the same to meet your requirement. Could you please try running this sample and let us know if this helps you.

Sample link:
http://www.syncfusion.com/downloads/support/directtrac/212490/ze/PrintingDemo-599407972.zip 

Regards,
Deivaselvan 

Loader.
Up arrow icon