This is a migrated thread and some comments may be shown as answers.

NestedViewTemplate expand issue

1 Answer 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
lakmal
Top achievements
Rank 2
lakmal asked on 15 Nov 2009, 06:15 AM
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

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Nov 2009, 05:32 AM
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.
Tags
Grid
Asked by
lakmal
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Share this question
or