3 Answers, 1 is accepted
0
Hello Glen,
XmlaDataProvider has PrepareDescriptionForField event which is raised when a new description is added via RadPivotFieldList. From the event arguments you can check the type of the description (if it is group - dimension, or aggregate - measure) and you can also modify the created description (by overriding e.Description value).
Hope this helps. Feel free to contact us in case you have any problems or concerns.
Regards,
Rosen Vladimirov
Telerik
XmlaDataProvider has PrepareDescriptionForField event which is raised when a new description is added via RadPivotFieldList. From the event arguments you can check the type of the description (if it is group - dimension, or aggregate - measure) and you can also modify the created description (by overriding e.Description value).
private
void
XmlaDataProvider_PrepareDescriptionForField(
object
sender, Telerik.Pivot.Core.PrepareDescriptionForFieldEventArgs e)
{
if
(e.DescriptionType == DataProviderDescriptionType.Aggregate)
{
e.Description =
new
XmlaAggregateDescription() { MemberName = (e.Description
as
XmlaGroupDescription).MemberName, CustomName =
"Some Name"
};
}
}
Hope this helps. Feel free to contact us in case you have any problems or concerns.
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
Glen
Top achievements
Rank 1
answered on 07 Apr 2014, 02:10 PM
Thanks. It looks to me like this is called before the field is actually added, is there an event that triggers after it has been added? Basically I just want to know when the dataprovider is completely updated.
0
Hi Glen,
There's no such event, but you can use StatusChanged event of the DataProvider and execute your logic when the status is "Ready". As the event is raised on multiple threads, you have to use a dispatcher in the handler in order to execute your code correctly:
Hope this helps.
Regards,
Rosen Vladimirov
Telerik
There's no such event, but you can use StatusChanged event of the DataProvider and execute your logic when the status is "Ready". As the event is raised on multiple threads, you have to use a dispatcher in the handler in order to execute your code correctly:
private
void
XmlaDataProvider_StatusChanged(
object
sender, Telerik.Pivot.Core.DataProviderStatusChangedEventArgs e)
{
if
(e.NewStatus == Telerik.Pivot.Core.DataProviderStatus.Ready && !(sender
as
XmlaDataProvider).HasPendingChanges)
{
Dispatcher.BeginInvoke(
new
Action(() => DoSmth();));
}
}
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.