Indenting a Child Grid

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

    Posted 08 Sep Link to this post

    How do I indent a child grid?
  2. Dess
    Admin
    Dess avatar
    1609 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.

    Regards,
    Dess
    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. UI for WinForms is Visual Studio 2017 Ready
Back to Top