Spacing Between Rows in Print Preview

5 posts, 0 answers
  1. Khalid
    Khalid avatar
    11 posts
    Member since:
    Sep 2010

    Posted 09 Oct 2015 Link to this post

    Is there a way to decrease row spacing between the rows in Print Preview?
  2. Hristo Merdjanov
    Admin
    Hristo Merdjanov avatar
    710 posts

    Posted 12 Oct 2015 Link to this post

    Hi Khalid,

    Thank you for writing.

    When RadGridView is about to be printed it sets row heights of the printed document according to the currently used height in the control. In order to accomplish your task you have a couple of options:
    1. Modify the row heights before printing the grid: GridViewRowInfo
    2. Use a GridPrintStyle and define a font, this class will also let you modify a number of other settings as well: GridPrintStyle
    3. Handle the PrintCellFormatting event and access each cell: PrintCellFormatting 
    I hope this helps. Should you have further questions please do not hesitate to write back.

    Regards,
    Hristo Merdjanov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Khalid
    Khalid avatar
    11 posts
    Member since:
    Sep 2010

    Posted 18 Oct 2015 in reply to Hristo Merdjanov Link to this post

    Im not able to change the height for the summary row.
  5. Khalid
    Khalid avatar
    11 posts
    Member since:
    Sep 2010

    Posted 18 Oct 2015 in reply to Khalid Link to this post

    the summary row is not effected in the print preview.
  6. Hristo Merdjanov
    Admin
    Hristo Merdjanov avatar
    710 posts

    Posted 21 Oct 2015 Link to this post

    Hi Khalid,

    Thank you for writing back.

    You can modify the row heights individually, including the height of the GridViewSummaryRowElement, which is affected by the value of the TableElement.RowHeight property: 
    this.radGridView1.TableElement.RowHeight = 40;
    foreach (GridViewRowInfo row in this.radGridView1.Rows)
    {
        row.Height = 20;
    }

    I am also sending you a gif file showing the result on my end.

    I hope this helps. Should you have further questions please do not hesitate to write back.

    Regards,
    Hristo Merdjanov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for WinForms is Visual Studio 2017 Ready