Left Margin of the Grid

4 posts, 0 answers
  1. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 11 May 2008 Link to this post

    I've set up a very simple read-only Grid, and set Docking to Fill and the Grid to Fill.
    However, there is a small Margin on the left side of the Grid (about the size of the scroll bar). This margin is there regardless if scrollbars are shown on the grid or not. Maybe used for complex hierarchical grids, but how can I remove this margin, so that the grid fills the whole area in my very simple case.
  2. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 12 May 2008 Link to this post

    Hello Erwin,

    Thank you for the question.

    You could remove GridTableElement padding by using the code block below:

    ((GridTableElement)this.radGridView1.RootElement.Children[0]).Padding = new Padding(0); 

    I hope this helps. If you have additional questions do not hesitate to contact me again.

    Kind regards,
    Martin Vasilev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 12 May 2008 Link to this post


    Thanks, works perfectly, what's the reason for having such a large left Margin / Padding?

    Erwin


  5. Martin Vasilev
    Admin
    Martin Vasilev avatar
    1061 posts

    Posted 12 May 2008 Link to this post

    Hello Erwin,

    I am glad to hear my suggestion has helped you achieve the desired appearance.

    Actually, there is no special reason for the default Padding values. We will consider removing them in our future releases.

    If you have other questions, do not hesitate to contact me again.

    All the best,
    Martin Vasilev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top