I have a grouped grid where user can select the whole group or just some groupmembers. If the whole group is selected, the groupitems shouldn't be displayed. If only one or more groupmembers are selected, the group should be expanded.
So I used this code (simplified):
Now, if the headerItems[...].Expanded is set to true, the group expands, but all items which are added after this assignment are set to style="display:none" and are only visible if I collapse and expand in client.
How can I fix this behavior?
So I used this code (simplified):
SortedList
<string, GridGroupHeaderItem> headerItems = new SortedList<string, GridGroupHeaderItem>();
protected void rtl_ItemDataBound(object sender, GridItemEventArgs e) { if (e.Item is GridGroupHeaderItem) { GridGroupHeaderItem item = (GridGroupHeaderItem)e.Item; headerItems.Add(groupDataRow["Betriebegruppe"].ToString(), item); } else if (e.Item is GridItem) { GridItem item = (GridItem)e.Item; item.Selected = dataBase.checkIsItemSelected(item); if (item.Selected && !headerItems[dataRow.Betriebegruppe].Expanded) { headerItems[dataRow.Betriebegruppe].Expanded = true; } } }Now, if the headerItems[...].Expanded is set to true, the group expands, but all items which are added after this assignment are set to style="display:none" and are only visible if I collapse and expand in client.
How can I fix this behavior?
