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

System.ArgumentException When Implementing GroupDescriptor

2 Answers 68 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Glenn
Top achievements
Rank 2
Glenn asked on 29 Jul 2010, 05:47 PM
I'm still very new to Telerik and still getting to know all the ins and outs of the controls.  What I'm doing is implementing a simple grouping mechanism to simulate a property grid.

XAML:

<telerik1:RadGridView Name="ParametersGridView"
                      CanUserDeleteRows="False"
                      CanUserInsertRows="False"
                      IsReadOnly="False"
                      AutoExpandGroups="True"
                      ShowGroupPanel="False"
                      ShowColumnHeaders="False"
                      AutoGenerateColumns="False"
                      HorizontalContentAlignment="Stretch"
                      HorizontalAlignment="Stretch"
                      VerticalContentAlignment="Stretch"
                      VerticalAlignment="Stretch"
                      RowLoaded="ParametersGridView_RowLoaded">
      
    <telerik1:RadGridView.GroupDescriptors>
        <telerikData:GroupDescriptor Member="Category"
                                     SortDirection="Ascending" />
    </telerik1:RadGridView.GroupDescriptors>
      
    <telerik1:RadGridView.Resources>
        <DataTemplate x:Key="GridToolTip">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding Description}" 
                           MaxWidth="300"
                           TextWrapping="Wrap" />
            </StackPanel>
        </DataTemplate>
    </telerik1:RadGridView.Resources>

    <telerik1:RadGridView.Columns>
        <telerik1:GridViewDataColumn Header="Parameter"
                                     DataMemberBinding="{Binding DisplayName}"
                                     Width="150"
                                     IsReadOnly="True" />
        <my:ConfigDataColumn Header="Value"
                              DataMemberBinding="{Binding Value,Mode=TwoWay}"
                              Width="300"
                              IsReadOnly="False" />
        <telerik1:GridViewDataColumn Header="Category"
                                     DataMemberBinding="{Binding Category}"
                                     IsReadOnly="True"
                                     IsVisible="False" />
    </telerik1:RadGridView.Columns>
</telerik1:RadGridView>

I load up the RadGridView.ItemsSource in the control's Loaded event.  When I run it, everything works just fine as expected.  However, when I try to view my control in the VS designer, I get a System.ArgumentException stating:"Invalid property or field - 'Category' for type: Customer".

First of all, I don't know where the "Customer" is coming from, there's no such class/object in my code.  Secondly, is this exception normal since I load my data at runtime?

...Glenn

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 30 Jul 2010, 06:45 AM
Hi Glenn,

 Do you have our latest version - Q2 2010? We had previously such problems due to our design-time data source (Customers) however this is now removed completely. 

Best wishes,
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
Glenn
Top achievements
Rank 2
answered on 02 Aug 2010, 12:49 PM
Looks like we're still running Q3 2009.  We'll get the latest and re-test.
Tags
GridView
Asked by
Glenn
Top achievements
Rank 2
Answers by
Vlad
Telerik team
Glenn
Top achievements
Rank 2
Share this question
or