Printing stackedHeaderRow with styles

pauta.png Hi, I have sdatagrid with stackedheader my columns has some styles to change its value foreground.

But when a Set the properties 

AllowPrintStyles = true, 
AllowPrintByDrawing = false,
CanPrintStackedHeaders = true,


while printing i´m getting the error bellow... 

System.NullReferenceException: Object reference not set to an instance of an object.

at Syncfusion.UI.Xaml.Grid.GridPrintManager.GetPrintHeaderCell(String mappingName)

at Syncfusion.UI.Xaml.Grid.PrintManagerBase.AddStackedHeaderRowToPanel(PrintPagePanel panel, RowInfo rowinfo)

at Syncfusion.UI.Xaml.Grid.PrintManagerBase.AddRowToPrintPagePanel(PrintPagePanel panel, RowInfo rowInfo, Int32 pageIndex)

at Syncfusion.UI.Xaml.Grid.GridPrintManager.AddRowToPrintPagePanel(PrintPagePanel panel, RowInfo rowInfo, Int32 pageIndex)

at Syncfusion.UI.Xaml.Grid.PrintManagerBase.CreatePage(Int32 pageIndex, PrintPageControl pageControl)

at Syncfusion.UI.Xaml.Grid.PrintManagerBase.CreatePage(Int32 pageIndex)

at Syncfusion.UI.Xaml.Grid.PrintManagerBase.Print(PrintDialog printDialog, Nullable`1 canPrint)

at Syncfusion.UI.Xaml.Grid.PrintManagerBase.Print()

at Syncfusion.UI.Xaml.Grid.SfDataGrid.Print()

at College.Wpf.Classrooms.Views.FinalistMiniAgendaPage.BtnPrint(Object sender, RoutedEventArgs e)


2 Replies

VS Vijayarasan Sivanandham Syncfusion Team June 20, 2023 02:49 PM UTC

Hi Mavungo,

We have created a bug report for the reported issue “Null reference exception occurs when printing stacked header while enabling AllowPrintStyles property”. We will fix this issue and include it in our upcoming Weekly NuGet release scheduled for July 11, 2023.


You can track the status of this report through the following feedback link,


Feedback Link: https://www.syncfusion.com/feedback/44621/null-reference-exception-occurs-when-printing-stacked-header-while-enabling


Note: The provided feedback link is private, and you need to login to view this feedback.


We appreciate your patience until then.

Regards,
Vijayarasan S



VS Vijayarasan Sivanandham Syncfusion Team July 12, 2023 08:22 AM UTC

Mavungo,

We would like to let you know that Essential Studio Weekly NuGet packages (v22.1.38) has been published in nuget.org with the fix for the issue “Null reference exception occurs when printing stacked header while enabling AllowPrintStyles property”. Please let us know if you have any concerns in this.


Loader.
Up arrow icon