Indenting a Child Grid

2 posts, 0 answers
  1. Simon
    Simon avatar
    11 posts
    Member since:
    Aug 2011

    Posted 08 Sep Link to this post

    How do I indent a child grid?
  2. Dess
    Dess avatar
    1561 posts

    Posted 12 Sep Link to this post

    Hello Simon,

    Thank you for writing.  

    In order to indent the child grid, it is necessary to apply Margin to the GridDetailViewCellElement in the ViewCellFormatting event:
    private void radGridView1_ViewCellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
        GridDetailViewCellElement detailCell = e.CellElement as GridDetailViewCellElement;
        if (detailCell != null)
            detailCell.Margin = new Padding(50, 0, 0, 0);

    I hope this information helps. Should you have further questions I would be glad to help.

    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
  3. DevCraft R3 2016 release webinar banner
Back to Top