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

Group expands automatically

2 Answers 41 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Thomas Gschweitl
Top achievements
Rank 1
Thomas Gschweitl asked on 21 Mar 2012, 05:29 PM
Hello everyone,

I am using Version 2011.3.1116.40 of GridView for WPF, if the Gridview is grouped I am saving the open groups in a list.
Everytime the user expands or collapses a group I add or remove the IGroup Element in the list.
After a refresh of the DatasourceProvider I expand all the groups which are in my list, but then if I scroll down the list the group with the first element in the list (datasource) is also expanded (GroupRowIsExpandedChanged event fires). It seems that after an refresh the currentscellinfo points to the first element and then if i scroll over the collapsed group where this element is included the group expands.
Do you have any ideas?

regards 
Thomas
 

2 Answers, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 26 Mar 2012, 07:02 AM
Hello,

Indeed this is the reason for expanding the group with the current item. You could try to clear it with a code similar to the following one:

this.radGridView.CurrentItem = null;
this.radGridView.CurrentColumn = null;
this.radGridView.CurrentCellInfo = null;

Let me know if this does not help.

Kind regards,
Nedyalko Nikolov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Thomas Gschweitl
Top achievements
Rank 1
answered on 27 Mar 2012, 09:59 AM
Thank you for the solution, this solved the problem.
regards

Thomas
Tags
GridView
Asked by
Thomas Gschweitl
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Thomas Gschweitl
Top achievements
Rank 1
Share this question
or