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

Grouping en edit mode

1 Answer 182 Views
Grid
This is a migrated thread and some comments may be shown as answers.
glenn
Top achievements
Rank 1
glenn asked on 30 Jul 2008, 02:33 PM
Hi,

When a row is in edit mode and i press a collapse button of the grouping feature, it does nothing.

Is it still possible to collapse a grouped item when there is a row in edit mode?

Thx in advance
Glenn

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 31 Jul 2008, 07:09 AM
Hello Glenn,

I tried the same scenario at my end and it works as required, i.e., the group collapses even if one row is in EditMode. However i noticed that the edit form does not get cleared when the group is collapsed and if this is the case, you can try out the following code snippet.
cs:
if (e.CommandName == "ExpandCollapse") 
        { 
            foreach (GridGroupHeaderItem groupHeader in RadGrid1.MasterTableView.GetItems(GridItemType.GroupHeader)) 
            { 
                GridItem[] children = groupHeader.GetChildItems(); 
                foreach (GridItem child in children) 
                { 
                    GridDataItem dataItem = child as GridDataItem; 
                    dataItem.Edit = false
                } 
            }            
        } 

Thanks
Princy.
Tags
Grid
Asked by
glenn
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or