NestedViewTemplate expand issue

2 posts, 0 answers
  1. lakmal
    lakmal avatar
    76 posts
    Member since:
    Jun 2009

    Posted 15 Nov 2009 Link to this post

    Hi,

    I have grid with tabstrip. tabstrip is inside NestedViewTemplate. When i expand one of row i want close previous expanded row.
    How can i do this. Is there any gridproperty set it

    lakmal
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 15 Nov 2009 Link to this post

    Hello Galgodage,

    You can try out the following code to expand one row at a time:
    c#:
    protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) 
        { 
            if (e.CommandName == RadGrid.ExpandCollapseCommandName) 
            { 
                foreach (GridItem item in e.Item.OwnerTableView.Items) 
                { 
                    if (item.Expanded && item != e.Item) 
                    { 
                        item.Expanded = false
                    } 
                } 
            } 
        }    

    Thanks
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top