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

The attachable property 'DataProvider' was not found in type 'RadPivotGrid'

2 Answers 92 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Wouter
Top achievements
Rank 1
Wouter asked on 03 Apr 2014, 12:53 PM
I have a RadPivotGrid setup as follows which gives the error stated in the title "The attachable property 'DataProvider' was not found in type 'RadPivotGrid'"
            <pivot:RadPivotGrid>
                <pivot:RadPivotGrid.DataProvider>
                    <pivot:LocalDataSourceProvider ItemsSource="{Binding Path=Events2}"/>
                </pivot:RadPivotGrid.DataProvider>
            </pivot:RadPivotGrid>

This is in Visual Studio 2013 Express with Telerik Q1 2014 WPF 4.5.

I also made sure I have the following references (and some extra):
Telerik.Pivot.Core
Telerik.Windows.Controls.Pivot
Telerik.Windows.Controls
System.Runtime.Serialization

It does compile but no interface is shown. Events is a list of standard objects with properties. If all works well should I assume that it just prints a flat grid with the above definition?

2 Answers, 1 is accepted

Sort by
0
Rosen Vladimirov
Telerik team
answered on 03 Apr 2014, 02:39 PM
Hi Wouter,

I'm not sure why you receive such a warning in Visual Studio, could you try closing it, removing bin and obj folders from your project and start the project again.

As per the empty screen - you have to define some group descriptions and aggregate descriptions in order to show RadPivotGrid, for example:
<pivot:RadPivotGrid x:Name="radPivotGrid" >
    <pivot:RadPivotGrid.DataProvider>
        <pivot:LocalDataSourceProvider>
            <pivot:LocalDataSourceProvider.ItemsSource>
                <local:AllOrders/>
            </pivot:LocalDataSourceProvider.ItemsSource>
            <pivot:LocalDataSourceProvider.RowGroupDescriptions>
                <pivot:PropertyGroupDescription PropertyName="Product" />
                <pivot:DateTimeGroupDescription PropertyName="Date" Step="Month" />
            </pivot:LocalDataSourceProvider.RowGroupDescriptions>
            <pivot:LocalDataSourceProvider.ColumnGroupDescriptions>
                <pivot:PropertyGroupDescription PropertyName="Advertisement" />
                <pivot:PropertyGroupDescription PropertyName="Promotion" />
            </pivot:LocalDataSourceProvider.ColumnGroupDescriptions>
            <pivot:LocalDataSourceProvider.AggregateDescriptions>
                <pivot:PropertyAggregateDescription PropertyName="Net" />
                <pivot:PropertyAggregateDescription  PropertyName="Quantity"/>
            </pivot:LocalDataSourceProvider.AggregateDescriptions>
        </pivot:LocalDataSourceProvider>
    </pivot:RadPivotGrid.DataProvider>
</pivot:RadPivotGrid>

You can find more information in our online help.

Hope this helps.

Regards,
Rosen Vladimirov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Wouter
Top achievements
Rank 1
answered on 03 Apr 2014, 04:13 PM
Thanks, restarting Visual Studio solved the problem. Also the PivodGrid is now visible with the added descriptions.
Tags
PivotGrid
Asked by
Wouter
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Wouter
Top achievements
Rank 1
Share this question
or