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

GridView Group Expand By Single

1 Answer 44 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Anand
Top achievements
Rank 1
Anand asked on 19 Apr 2011, 10:12 AM
Hi,


GridView Group Expand By Single using any property ?Like  mode "Single/Multiple"


Regards
Anand

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 19 Apr 2011, 10:36 AM
Hi Anand,

If you want to expand a particular group, you may use the ExpandGroup() method of the grid. In case you require only a single group to be expanded at a time, you may benefit from the approach demonstrated in this blog post. However, your implementation may be similar to:

GridViewGroupRow lastExpandedGroupRow;
void clubsGrid_GroupRowIsExpandedChanging(object sender, Telerik.Windows.Controls.GridView.GroupRowCancelEventArgs e)
        {
            if((e.Row as GridViewGroupRow).IsExpanded == true)
            {
                if(lastExpandedGroupRow != null)
                {
                    lastExpandedGroupRow.IsExpanded = false;
                }
                lastExpandedGroupRow = e.Row as GridViewGroupRow;
            }          
        }
 

Kind regards,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Anand
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or