SfDataGrid Printing Header Template Binding

Hi,
Is it possible that in the Header Template for printing in the SfDataGrid to use binding? If so, what's the DataContext in the Template (the ItemsSource of the SfDataGrid?)
I would like to use a generic Template for the Header and then populate some TextBlock in it with some binding.
Thanks in advance.

1 Reply

DY Deivaselvan Y Syncfusion Team August 10, 2018 07:29 AM UTC

Hi David,

Thank you for contacting Syncfusion support.

PrintMangerBase is the DataContext for the PrintPageControl, where the header and footer templates are loaded. You can bind property the HeaderTemplate by specifying the Source details.

Please refer the below UG and article links for more details to meet your requirement.
https://help.syncfusion.com/wpf/sfdatagrid/printing#setting-header-and-footer
https://help.syncfusion.com/wpf/sfdatagrid/printing#printing-current-date-time-and-page-number
https://www.syncfusion.com/kb/3099/how-to-print-sfdatagrid-with-header-and-footer

Please let us know if you have any other questions.

Regards,
Deivaselvan 


Loader.
Up arrow icon