Indenting a Child Grid

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

    Posted 08 Sep 2016 Link to this post

    How do I indent a child grid?
  2. Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    4074 posts

    Posted 12 Sep 2016 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.
Back to Top