Hi. I am trying to print an XamDataGrid to the computers default printer but the XamDataGrid fields is not autosized even though I am specifying this in my xaml. I am using Infragistics v11.2.
Here is my code for printing the grid:
Here is my xaml code for the XamDataGrid:
As you can see the Width is set to Auto.
When I specify reportObj.Print(true, false); the fields are autosized as expected, but when I choose to not show the print dialog the fields width is in a default size.
Is this a bug in Infragistics or am I missing something? The only difference between the fields being printed correctly with autowidth and incorrectly without autowidth is the print dialog boolean.
Sorry for the code being posted as images, but I don't know how i can copy the code so that its not just shown in plain text on the forums.
HI,
This is not a bug. It happens because the last field 'FullStreetAddress' is too long to fit on the same page with 'Name' and 'Age'.
In this case we put 'FullStreetAddress' on the next page and, by default, make the last field on the previous page (in this case 'Age') expand to fill the remaining space on that page. This behavior can be turned off by setting the CellPageSpanStrategy on the ReportView to "NextPage" e.g.:
<igDP:XamDataGrid.ReportView>
<igDP:TabularReportView CellPageSpanStrategy="NextPage"/>
</igDP:XamDataGrid.ReportView>
Sincerely,
Matt
Developer Support Engineer
I have created sample XamDataGrid Application and have replicated your issue.
I will create a private case for this issue and notify the developers.
Sincerely, Matt Developer Support Engineer