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
245
Printing Problem
posted
Hi,
I am facing some problems when i using the wingrid print option.
Below are some of the problem
-------------------------------------------
1. If u click the print button, we are seeing the data in the new default screen window. In that we have the option of print, close,etc.. if i click the print i am not getting the window screen whcih will options to choose the printer, setting the pages... etc.. i have attached the screen shot. kindly look into that and send the sample code how to implement.
 
2. i want to make this as in bold letters which i make it as bold below

  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...

  • 71886
    Offline posted

    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.