UltraGridLayout ugLayout = new UltraGridLayout();
ugLayout.Reset();
UltraGridPrintDocument ugPrintDoc = new UltraGridPrintDocument();
ugPrintDoc.Header.TextCenter = "Welcome" + "\n\n";
ugPrintDoc.Header.TextLeft = ("Print Time: ") + DateTime.Now.ToString("MM/dd/yyyy HH:mm ");
ugPrintDoc.Grid = ugrid;
etops.PrintPreview(ugLayout, ugPrintDoc);
3. In the printpreview, i have to display 11 columns... After the 11 th column, i am getting some extra space
.. Kindly tell me how to clear that.
Thanks...
Hello Ramvrp,
To your questions:
1. You might want to use the Microsoft's PrintDialog control for that. It will give you some options regarding the pages and the printer.
2. You could do that by setting the FontData.Bold like in the following code sample:
ugPrintDoc.Header.Appearance.FontData.Bold = DefaultableBoolean.True;
3. You might be able to get rid of the extra space by increasing the width of a single column or of all the columns by few pixels. Something similar to the following:
ultraGrid1.DisplayLayout.Bands[0].Columns[0].Width += 5;
Please feel free to let me know if I misunderstood you or if you have any other questions.