I have an Ultragrid with cells that are being used for free form text entry up to 1000 characters. The scroll bars in the cells are turned on. I have an UltragridPrintDocument set up to print the contents of the grid. When the document is printed, only the visible area of the cell prints. Is there a document property that can be set to print the full contents of the cell rather than just the visible area?
Thanks
Roger
Roger,
One way to do this would be to have each row resize itself when preparing to print; this will not affect the layout of the original grid, only the one being printed. Try the following in the grid's InitializePrint event:
private void ultraGrid1_InitializePrint(object sender, Infragistics.Win.UltraWinGrid.CancelablePrintEventArgs e){ e.PrintLayout.Override.RowSizing = RowSizing.Free; foreach (UltraGridRow row in e.PrintLayout.Rows) row.PerformAutoSize();}
-Matt
Matt,
I understand the strategy, but I was unable to get it to work.
In my application, the grid is being used like a windows form. The grid has a single row and the columns are stacked vertically. I enabled autosizing on the grid which works fine on the entry screen when the cell is selected, but performing autosizing on the row during the initialize print doesn't have any effect. I may just have to do a Crystal Report.