Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
500
Printing an XamDatagrid without print dialog
posted

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.