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
445
Add text lines before print UltraGrid
posted

I need to add couple of text lines on the top of the page when print an UltraGrid. Also I need to show preview dialog before print . The print output should be something like this for example:

Number: 123456      Name: ABCD

Address:  xxxxxxxx      Zip:      12345

----------------------------------------------

|               my UltraGrid data              |

-----------------------------------------------

So I added UltraGridPrintDocument and UltraPrintPreviewDialog in my form. And I tried to use that  "ultraGridPrintDocument.Header.TextLeft" property but it seems can only add one text line and also cannot be formatted to align those fields on the top. Here is my code snip:

ultraGridPrintDocument.Header.TextLeft = "Number...................";

ultraPrintPreviewDialog.Document = ultraGridPrintDocument;

 ultraPrintPreviewDialog.ShowDialog(this);

So what is the right way to add text lines on top of the Grid and also make those text fields aligned? Should I put those text fields into another UltraGrid and add that on top of my data grid when print? Please provide some sample code if possible.

Thanks! 

Parents Reply Children
No Data