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

Code breaks, after upgrading to 2012 Q1

6 Answers 50 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Aracna
Top achievements
Rank 1
Aracna asked on 21 Jun 2012, 04:05 AM
Hi,

I have used grouping and filtering programmatically in my  application by following the post below.
http://www.telerik.com/community/forums/wpf/gridview/group-aggregate-without-displaying-the-group-panel.aspx 

But after I upgraded my controls to 2012 Q1, the grouping event is not triggered at all.

6 Answers, 1 is accepted

Sort by
0
Aracna
Top achievements
Rank 1
answered on 25 Jun 2012, 07:47 AM
Awaiting a reply on this...
0
Vera
Telerik team
answered on 25 Jun 2012, 04:14 PM
Hello Aracna,

 
Actually, this is by design. The Grouping event is raised when the data in RadGridView is grouped from the UI. You can use GroupDescriptors_CollectionChanging event instead.

I hope this helps.

Kind regards,
Vera
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Aracna
Top achievements
Rank 1
answered on 26 Jun 2012, 01:42 AM
The GroupDescriptor_CollectionChanged event is never raised either.
0
Vera
Telerik team
answered on 26 Jun 2012, 07:49 AM
Hello Aracna,

 
I have modified the project attached in the forum thread using binaries from Q2 2012. Please take a look at it.

Let me know in case further assistance is needed.


Kind regards,
Vera
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Aracna
Top achievements
Rank 1
answered on 26 Jun 2012, 08:53 AM
In my codes I had some thing like
private void Button1_Click(object sender, RoutedEventArgs e)
        {
_groupview = new QueryableCollectionView(FODListGrid.Items);
            var descriptor = new GroupDescriptor() { Member = "Country" };
            descriptor.AggregateFunctions.Add(new CountFunction());
            this.ListGrid.GroupDescriptors.Add(descriptor);
}

Then when I wish to display these groups I have code like:

 foreach (QueryableCollectionViewGroup catgroup in _groupview.Groups)
 {
}

But the _groupview.Groups is null
0
Vera
Telerik team
answered on 27 Jun 2012, 12:41 PM
Hi Aracna,

 
Actually, the groups are expected to be null. In order to get the groups you can use e.NewItems and e.OldItems of GroupDescriptors_CollectionChanged event. See the code bellow:

foreach (GroupDescriptor item in e.NewItems
{
}


I hope this helps.

Regards,
Vera
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Aracna
Top achievements
Rank 1
Answers by
Aracna
Top achievements
Rank 1
Vera
Telerik team
Share this question
or