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

Pivot Grid Row Label

6 Answers 278 Views
PivotGrid and PivotFieldList
This is a migrated thread and some comments may be shown as answers.
KUMARAN
Top achievements
Rank 1
KUMARAN asked on 21 Jan 2015, 06:54 AM
I use integer fields in Row labels ,but it displays range values instead of integer 

For Example Shown like below.

Sec Num    Sec Num
12456           10000-13000
42345            40000-50000

6 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 23 Jan 2015, 01:12 PM
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:
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.
0
Accepted
Ralitsa
Telerik team
answered on 26 Jan 2015, 09:03 AM
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
 

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
Ralitsa
Telerik team
answered on 27 May 2015, 08:05 AM
Hi Kumaran,

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
Tags
PivotGrid and PivotFieldList
Asked by
KUMARAN
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
KUMARAN
Top achievements
Rank 1
Ralitsa
Telerik team
Share this question
or