6 Answers, 1 is accepted
0
Hello Kumaran,
Thank you for writing.
I suppose that you are facing the behavior illustrated in the attached gif file. Note that depending on the field type, such a group descriptor is created. When you populate the pivot with data in correspondence with the Using the DataSource property help article for example, a PropertyGroupDescription is added to the ColumnGroupDescriptions collection. When you hide it and add it again using the field list, a DoubleGroupDescription is created, considering the field type. As a result, a range of numbers is displayed. However, you can change this behavior by subscribing to the DataProvider.PrepareDescriptionForField event and replace the DoubleGroupDescription with a PropertyGroupDescription as follows:
However, if it is not the exact case, please specify in details what is the exact problem that you are facing. It would be greatly appreciated if you provide some screenshots illustrating better the undesired result. Thank you.
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Desislava
Telerik
Thank you for writing.
I suppose that you are facing the behavior illustrated in the attached gif file. Note that depending on the field type, such a group descriptor is created. When you populate the pivot with data in correspondence with the Using the DataSource property help article for example, a PropertyGroupDescription is added to the ColumnGroupDescriptions collection. When you hide it and add it again using the field list, a DoubleGroupDescription is created, considering the field type. As a result, a range of numbers is displayed. However, you can change this behavior by subscribing to the DataProvider.PrepareDescriptionForField event and replace the DoubleGroupDescription with a PropertyGroupDescription as follows:
private
void
DataProvider_PrepareDescriptionForField(
object
sender, PrepareDescriptionForFieldEventArgs e)
{
if
(e.Description
is
DoubleGroupDescription)
{
e.Description =
new
PropertyGroupDescription() { PropertyName = e.Description.DisplayName, GroupComparer =
new
GrandTotalComparer() };
}
}
However, if it is not the exact case, please specify in details what is the exact problem that you are facing. It would be greatly appreciated if you provide some screenshots illustrating better the undesired result. Thank you.
I hope this information helps. Should you have further questions, I would be glad to help.
Regards,
Desislava
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
KUMARAN
Top achievements
Rank 1
answered on 23 Jan 2015, 02:17 PM
Problem is the same,but i didn't get the solution by using Data provider.
Send me sample project to rectify the problem.
Send me sample project to rectify the problem.
0
Accepted
Hi Kumaran,
Thank you for your reply.
I attached a sample demo project as you requested.
Hope this will help you. Let me know if you have any another questions.
Regards,
Ralitsa
Telerik
Thank you for your reply.
I attached a sample demo project as you requested.
Hope this will help you. Let me know if you have any another questions.
Regards,
Ralitsa
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
KUMARAN
Top achievements
Rank 1
answered on 26 Jan 2015, 10:13 AM
Thanks Ralitsa it works
0
KUMARAN
Top achievements
Rank 1
answered on 26 May 2015, 11:53 AM
And i want show sum of value colums by removing decimals like shown below.
1245.00 -> 1245
1.00 -> 1
0
Accepted
Hi Kumaran,
Thank you for writing back.
You can set the StringFormat property to custom numeric format. Here is the code snippet:
I hope this will help you. Let me know if you have any other questions.
Regards,
Ralitsa
Telerik
Thank you for writing back.
You can set the StringFormat property to custom numeric format. Here is the code snippet:
Me.RadPivotGrid1.AggregateDescriptions.Add(New PropertyAggregateDescription() With { _
.PropertyName =
"Freight"
, _
.AggregateFunction = AggregateFunctions.Sum, _
.StringFormat =
"#####"
_
})
I hope this will help you. Let me know if you have any other questions.
Regards,
Ralitsa
Telerik
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 Feedback Portal
and vote to affect the priority of the items