I am using a Gridview with 2 default column groupings based on the properties Status and Company. I am using ContextMenu to update the Status on all the rows under the clicked Company group.
The grid grouping looks something like this.
- Company B
Issue 1: Updating the status on each row fires the PropertyChanged and the grid is refreshed and scrolled to the top. I have about 100 groups of company and would like to maintain the scroll position after the status has been updated via the context menu.
Issue 2: At the moment, I am collapsing all Company groups using the DataLoaded event. These groups will be collapsed again when the status on any of the rows have been updated even if the user has expanded some of them. Is there a way to make it maintain the group expansion state after the data update?
Telerik Version: 2011.1.419.1040
This is the Xaml:
Code for collapsing 2nd level groups:
The grid grouping looks something like this.
- Status = Invited
- Company B
- Status = Excluded
Issue 1: Updating the status on each row fires the PropertyChanged and the grid is refreshed and scrolled to the top. I have about 100 groups of company and would like to maintain the scroll position after the status has been updated via the context menu.
Issue 2: At the moment, I am collapsing all Company groups using the DataLoaded event. These groups will be collapsed again when the status on any of the rows have been updated even if the user has expanded some of them. Is there a way to make it maintain the group expansion state after the data update?
Telerik Version: 2011.1.419.1040
This is the Xaml:
<
radGrid:RadGridView
x:Name
=
"grdInvitee"
Margin
=
"0 0 0 0"
MaxHeight
=
"300"
MaxWidth
=
"1120"
HorizontalAlignment
=
"Left"
ShowGroupPanel
=
"False"
AutoGenerateColumns
=
"False"
AutoExpandGroups
=
"True"
ItemsSource
=
"{Binding InviteeList}"
EditTriggers
=
"CellClick"
CanUserDeleteRows
=
"False"
CanUserInsertRows
=
"False"
>
<
telerik:RadContextMenu.ContextMenu
>
<
telerik:RadContextMenu
x:Name
=
"Menu"
Opened
=
"MenuOpened"
></
telerik:RadContextMenu
>
</
telerik:RadContextMenu.ContextMenu
>
Code for collapsing 2nd level groups:
private void grdInvitee_DataLoaded(object sender, EventArgs e)
{
// collapse all child groups (organisation group)
foreach (IGroup parentGrp in grdInvitee.Items.Groups)
{
foreach (IGroup childGrp in parentGrp.Subgroups)
{
grdInvitee.CollapseGroup(childGrp);
}
}
}