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

RadPivotGrid can not display

5 Answers 76 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Ql
Top achievements
Rank 1
Ql asked on 17 Dec 2013, 04:13 AM
Hi,
I download controls of telerik which the version is 2013 Q3, after binding the itemsource for RadPivotGrid, but it can't display.
Here's the XAML part for RadPivotGrid definition:
<pivot:RadPivotGrid x:Name="Pivot" HorizontalAlignment="Left" Width="800" Height="400" Grid.Column="0" Grid.Row="0" VerticalAlignment="Top">
            <pivot:RadPivotGrid.DataProvider>
                <pivot:LocalDataSourceProvider x:Name="LocalDataProvider" ItemsSource="{Binding PivotItemSource}" >                    
                    <pivot:LocalDataSourceProvider.RowGroupDescriptions>
                        <pivot:PropertyGroupDescription PropertyName="NAME1" />
                    </pivot:LocalDataSourceProvider.RowGroupDescriptions>
                    <pivot:LocalDataSourceProvider.ColumnGroupDescriptions>
                        <pivot:PropertyGroupDescription PropertyName="NAME2" />
                    </pivot:LocalDataSourceProvider.ColumnGroupDescriptions>
                    <pivot:LocalDataSourceProvider.AggregateDescriptions>
                        <pivot:PropertyAggregateDescription PropertyName="NAME17" />
                    </pivot:LocalDataSourceProvider.AggregateDescriptions>
                </pivot:LocalDataSourceProvider>
            </pivot:RadPivotGrid.DataProvider>
        </pivot:RadPivotGrid>

The c# code for the itemsource is:
 public ObservableCollection<object> PivotItemSource
        {
            get { return this._pivotDisplayModel.PivotItemSource; }
            set { this._pivotDisplayModel.PivotItemSource = value; }
        }

I use this PivotItemSource to binding the itemsource in the RadGridView, the RadGridView display fine. I don't know why the RadPivotGrid can't display, anyone can answer me?

Another question, the <object> class is dynamical, does the RadPivotGrid can support binding the dynamical class as itemsource?

5 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 17 Dec 2013, 01:08 PM
Hello Ql,

We have noticed that there is a support ticket (ID 769234) submitted with the exactly the same question, which I already answered. So I'll just include my reply here also and attach the sample project from there:

Using ObservableCollection<object> shouldn't be a problem when binging the ItemsSource of the PivotGrid.
Problem might appear if the objects in the collection don't have the same properties which are used as PropertyGroupDescriptions of the PivotGrid DataProvider - in this case the PivotGrid won't be able to visualize anything. However I have prepared a sample project which demonstrates the same scenario - PivotGrid and GridView bound to the same ObservableCollection<object> in the ViewModel. I have also included a button which changes the ItemsSource collection on click.


Hope this helps.

Regards,
Kalin
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Ql
Top achievements
Rank 1
answered on 18 Dec 2013, 04:37 AM
Hi Kalin,

Thanks for your answer. I find the point problem of my project. That's because I use Emit to create a new instance in foreach, as a result of that, each instance's type is different.
0
Kalin
Telerik team
answered on 18 Dec 2013, 08:57 AM
Hi Ql,

I'm glad you managed to resolve the issue. If you have any other questions let us know.

Regards,
Kalin
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Ng
Top achievements
Rank 1
answered on 06 Nov 2014, 10:44 AM
Hi Ql,

I'm doing something about this RadPivotGrid, I'm facing the exactly problem as you. Can you describe the way you solve or provide a simple sample here? I'm quite desperate on it now. 

Thanks.

I did bind it from my xaml to my viewmodel and I could get the data when I'm debugging but it just will not generate or show the result out. 
0
Kalin
Telerik team
answered on 07 Nov 2014, 01:04 PM
Hi Ng,

If you share some sample code demonstrating the PivotGrid setup we will be glad to test it on our side and find out what is causing the issue.

Regards,
Kalin
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.

 
Tags
PivotGrid
Asked by
Ql
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Ql
Top achievements
Rank 1
Ng
Top achievements
Rank 1
Share this question
or