heirarchy grid

3 posts, 0 answers
  1. Atefeh
    Atefeh avatar
    4 posts
    Member since:
    Jun 2012

    Posted 28 May 2012 Link to this post

    Hi
    I used from Hierarchy grid.how can i resize width of child grid .
    i can resize height of cells of child grid with this code

    void radGridView1_ChildViewExpanded(object sender, ChildViewExpandedEventArgs e)
    {
        e.ChildRow.Height = 300;
    }

    but cant change width of child grid.In normal width of child grid is same with parent grid
  2. Boryana
    Admin
    Boryana avatar
    330 posts

    Posted 31 May 2012 Link to this post

    Hello Atefeh,

    Thank you for contacting us.

    As far as I understand, you would like to change the width of the child row, so that its blue frame matches the width of the parent row. If this is the case, please try the following approach:
    private void radGridView1_ViewRowFormatting(object sender, Telerik.WinControls.UI.RowFormattingEventArgs e)
    {
        if (e.RowElement is GridDetailViewRowElement)
        {
            int width = this.radGridView1.TableElement.VisualRows[0].Size.Width;
            e.RowElement.MaxSize = new Size(width, 0);
        }
    }

    If your requirement differs from my guess, please provide a screenshot of the layout you would like to achieve.

    All the best,
    Boryana
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
  3. Atefeh
    Atefeh avatar
    4 posts
    Member since:
    Jun 2012

    Posted 01 Jun 2012 Link to this post

    Thank 's a lot Boryana  for your help
Back to Top