We have set RowSizingAutoMaxLines to 10 for screen display. But for grid report, we'd like to display all info, is there a way to reset RowSizingAutoMaxLines for grid report.
Thanks,
Crystal.
Thanks a lot, Mike. It works fine now after I added the code in.
Hi Crystal,
Okay, I see the problem. If you just run the sample and click the button you will see that it is actually working, but only for the rows that are not on-screen initially. This is because the rows don't get re-sized when you print. So the rows that are already on-screen on using their on-screen sizes when printing. The other rows have not yet been created yet (since they are not visible) and they get created when you print, at which time the RowSizingAutoMaxLines has been reset, so it works okay for those rows. So what you have to do is force the print rows to be autosized again when printing.
private void ultraGrid1_InitializeRow(object sender, InitializeRowEventArgs e) { if (e.Row.Band.Layout.IsPrintLayout) { e.Row.Band.Layout.Override.ResetRowSizingAutoMaxLines(); e.Row.PerformAutoSize(); } }
Hi Mike, I am able to reproduce the issue in a sample project, please see attachment. Thanks a lot for looking into it.
It's using VS2008 V9.0, infragistics2 v9.2
Crystal
Hm, I don't see how that can be. Can you post a small sample project demonstrating this so I can take a look?
Hi Mike,
I tried to use ResetRowSizingAutoMaxLines in both InitializePrintPreview and InitializePrint event handlers, Not all data displayed in first page, large row is still cut, rows in other pages are displayed correctly in report print preview and printed report.
If I removed the RowSizingAutoMaxLines setting in InitializeLayout, all data in all rows are displayed in report, but we need to set the property to limit the row height in screen.