Hello,
Seems that all posts that are remotely related to what I am experiencing are close to or more than a year old.
Once again I have the issue with the Telerik help that all code and samples are for static data sets and I find it really difficult to get samples of code that actually work in an MVVM environment. Point in case, according to the Telerik PivotGrid help, the following code is supposed to define rows for a localdataprovider:
Telerik.Pivot.Core.PropertyGroupDescription propertyGroupDescription = new Telerik.Pivot.Core.PropertyGroupDescription();
propertyGroupDescription.PropertyName = "Name";
DateTimeGroupDescription dateTimeGroupDescription = new DateTimeGroupDescription();
dateTimeGroupDescription.PropertyName = "Date";
dateTimeGroupDescription.Step = DateTimeStep.Month;
using (localDataProvider.DeferRefresh())
{
localDataProvider.RowGroupDescriptions.Add(propertyGroupDescription);
localDataProvider.RowGroupDescriptions.Add(dateTimeGroupDescription);
};
However as soon as I set the ItemsSource property to my actual collection of data, then the RowGroupDescriptions and ColumnGroupDescriptions collections are set to 0 and then nothing shows in the control.
Same if I set the ItemsSource before defining the groups, then the PropertyGroupDescriptions don't even get added to the collections.
I can't find any help on this scenario so I have posted here.
Seems that all posts that are remotely related to what I am experiencing are close to or more than a year old.
Once again I have the issue with the Telerik help that all code and samples are for static data sets and I find it really difficult to get samples of code that actually work in an MVVM environment. Point in case, according to the Telerik PivotGrid help, the following code is supposed to define rows for a localdataprovider:
Telerik.Pivot.Core.PropertyGroupDescription propertyGroupDescription = new Telerik.Pivot.Core.PropertyGroupDescription();
propertyGroupDescription.PropertyName = "Name";
DateTimeGroupDescription dateTimeGroupDescription = new DateTimeGroupDescription();
dateTimeGroupDescription.PropertyName = "Date";
dateTimeGroupDescription.Step = DateTimeStep.Month;
using (localDataProvider.DeferRefresh())
{
localDataProvider.RowGroupDescriptions.Add(propertyGroupDescription);
localDataProvider.RowGroupDescriptions.Add(dateTimeGroupDescription);
};
However as soon as I set the ItemsSource property to my actual collection of data, then the RowGroupDescriptions and ColumnGroupDescriptions collections are set to 0 and then nothing shows in the control.
Same if I set the ItemsSource before defining the groups, then the PropertyGroupDescriptions don't even get added to the collections.
I can't find any help on this scenario so I have posted here.