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

Upgrade to Q3 - 2010 exposed missing command

1 Answer 41 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 1
Brian asked on 20 Nov 2010, 09:20 PM
I upgraded from Q2 to Q3 and no errors were reported. After a code recompile I received the following error:

Error   8   'Telerik.Windows.Data.IGroupDescriptor' does not contain a definition for 'Member'
and no extension method 'Member' accepting a first argument of
type 'Telerik.Windows.Data.IGroupDescriptor' could be found (are you missing a using directive
or an assembly reference?) ..."

For the following code:

private void GridTimeCards_Grouped(object sender, Telerik.Windows.Controls.GridViewGroupedEventArgs e)
       {
           if (e.Action != Telerik.Windows.Controls.GroupingEventAction.Remove)
           {
               if (e.GroupDescriptor.Member == "EmployeeID" && GridTimeCards.GroupDescriptors.Count() == 1)
               {
                   SetupGroupsAndAggregates(e.GroupDescriptor.Member);
               }
               if (e.GroupDescriptor.Member == "Job" && GridTimeCards.GroupDescriptors.Count() == 1)
               {
                   SetupGroupsAndAggregates(e.GroupDescriptor.Member);
               }
           }
       }

This code was used for the gridview grouping to set up the aggregators. It seems the "Member" property of e.GroupDescriptor is no longer in the Q3 version. What is the replacement property to achieve the same results?

Thanks,

Scott Peal
Company Automation LLC

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 22 Nov 2010, 09:31 AM
Hello Brian,

We have introduced several breaking changes in that direction - please check them here.
You need to cast the e.GroupDescriptor to ColumnGroupDescriptor and use its Column property to get the column that is being grouped.

Your column should look like this now:

if (e.Action == GroupingEventAction.Remove)
{
    ColumnGroupDescriptor cgd = e.GroupDescriptor as ColumnGroupDescriptor;
    GridViewDataColumn column = cgd.Column as GridViewDataColumn;
 
    if (column.DataMemberBinding.Path.Path == "EmployeeID" && GridTimeCards.GroupDescriptors.Count() == 1)
    {
        SetupGroupsAndAggregates(column.DataMemberBinding.Path.Path);
    }
 
    if (column.DataMemberBinding.Path.Path == "Job" && GridTimeCards.GroupDescriptors.Count() == 1)
    {
        SetupGroupsAndAggregates(column.DataMemberBinding.Path.Path);
    }
}

Hope this helps.

Best wishes,
Veselin Vasilev
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
General Discussions
Asked by
Brian
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or