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

Member invalid in GroupDescription

6 Answers 71 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rudis
Top achievements
Rank 1
Rudis asked on 13 Apr 2010, 02:02 PM
Hello!

I have problem with RadGridView grouping.

<telerikGrid:RadGridView x:Name="InmattVolymGridView" Language="sv-SE" AutoGenerateColumns="False"         
                                         ShowColumnFooters="True"
                                         VerticalAlignment="Top"
                                         ItemsSource="{Binding InmattaVolymer, ValidatesOnDataErrors=True, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
                                         Validation.ErrorTemplate="{DynamicResource validationTemplate}"
                                         ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors).CurrentItem.ErrorContent}" >
                   
                    <telerikGrid:RadGridView.Columns>
                        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding Sortiment}" Header="Sortiment" Width="85"/>
                        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding InmattM3F}" Header="m3f Inmätt" Width="100" >
                            <telerikGrid:GridViewDataColumn.AggregateFunctions>
                                <telerikData:SumFunction SourceField="InmattM3F" />
                            </telerikGrid:GridViewDataColumn.AggregateFunctions>
                        </telerikGrid:GridViewDataColumn>
                        <telerikGrid:GridViewDataColumn DataMemberBinding="{Binding SortimentTyp}" Header="Sortimenttyp" Width="85"/>
                    </telerikGrid:RadGridView.Columns>
                    <telerikGrid:RadGridView.GroupDescriptors>
                        <telerikData:GroupDescriptor SortDirection="Ascending" Member="SortimentTyp">
                            <telerikData:GroupDescriptor.AggregateFunctions>
                                <telerikData:CountFunction Caption="Total volym:" />
                            </telerikData:GroupDescriptor.AggregateFunctions>
                        </telerikData:GroupDescriptor>
                    </telerikGrid:RadGridView.GroupDescriptors>
                 </telerikGrid:RadGridView>

I get 'Invalid Property or Field' on Member in GroupDescription. How should I connect the grouping to the column.

Best regards / Anna

6 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 13 Apr 2010, 04:07 PM
Hi Anna Rudlund,

I used your xaml file in order to see where the problem is, but unfortunately I could not reproduce it. Is your error in Run Time or Design Time? 
Any additional details for your business object will be appreciated so that I can be more helpful in your case.

Greetings,
Maya
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Rudis
Top achievements
Rank 1
answered on 13 Apr 2010, 04:19 PM
I´m getting the problem at design time. I´m using version 2009.3.1314.35 of Telerik.Windows.Data.dll. Is this the latest?

ItemsSource binding the to this item:
      
public BindingList
<InmattVolymViewModel> InmattaVolymer { get { return _inmattaVolymer; } }

----------------------------------------------------------------
public class InmattVolymViewModel
    {
        #region Public Properties

        public string SortimentTyp
        {
            get { return _sortimentTyp; }
            set
            {
                if (_sortimentTyp != value)
                {
                    _sortimentTyp = value;
                    OnPropertyChanged("SortimentTyp");
                }
            }
        }

        public string Sortiment
        {
            get { return _inmattVolym.SortimGrpNamn; }
            set
            {
                if (_inmattVolym.SortimGrpNamn != value)
                {
                    _inmattVolym.SortimGrpNamn = value;
                    OnPropertyChanged("Sortiment");
                }
            }
        }

        public decimal InmattM3F
        {
            get { return _inmattVolym.Inm3F; }
            set
            {
                if (_inmattVolym.Inm3F != value)
                {
                    _inmattVolym.Inm3F = value;
                    OnPropertyChanged("InmattM3F");
                }
            }
        }
       
        #endregion
    }

/Anna
0
Maya
Telerik team
answered on 14 Apr 2010, 01:18 PM
Hello Anna Rudlund,

After reviewing the case we have found that you have hit a known issue with RadGridView.  Typically in design time RadGridView will try to use a sample dummy datasource. 

Since this datasource is not compatible with the properties of your business object , you get the error message. The good news is that this wold not affect the runtime behavior of your application and you may just ignore the message. 

Since this behavior is a bit annoying and not intuitive we are already taking steps to improve it for our future versions. 

Please excuse us for the inconvenience caused.

Greetings,
Maya
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Rudis
Top achievements
Rank 1
answered on 14 Apr 2010, 01:23 PM
But I do get errors in runtime as well...

/Anna
0
Vlad
Telerik team
answered on 14 Apr 2010, 01:25 PM
Hi Anna,

Can you send us an example project (via support ticket) where we can debug your scenario?

All the best,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Rudis
Top achievements
Rank 1
answered on 14 Apr 2010, 01:42 PM
I must ask higher authorities first.

However, the grid don´t group my items and when I manually group them by dragging it to the header and then closes it I get the following message:

Unable to cast object of type 'MS.Internal.NamedObject' to type 'Telerik.Windows.Data.GroupDescriptor'.

/Anna
Tags
GridView
Asked by
Rudis
Top achievements
Rank 1
Answers by
Maya
Telerik team
Rudis
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or