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

Header values for RadPivotGrid

2 Answers 211 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Waqas
Top achievements
Rank 1
Waqas asked on 25 Apr 2015, 12:39 PM

Hi,

I am using RadPivotGrid with my dyynamic selection of data and each time i get the datatable, i add appropriate values in LocalDataSourceProvider.RowGroupDescriptions, LocalDataSourceProvider.ColumnGroupDescriptions, LocalDataSourceProvider.AggregateDescriptions. I am using the following sample code to add values in these collection as example

var property = new PropertyGroupDescription();
property.PropertyName = item.DisplayName;
property.CustomName = item.DisplayName;
LocalDataSourceProvider.RowGroupDescriptions.Add(property);

All works fine. But in case of "RowGroupDescriptions", i want to display header values to let user know what they are. I have attached an image to describe the requirement.

here you can see that i have added "ID", "Status" and "TrackingNumber" in  RowGroupDescriptions. "Priority" in ColumnGroupDescriptions and "Value" in ColumnGroupDescriptions. All looks good but i am unable to get header values for RowGroupDescriptions fields as mentioned in screenshot.

Please note that these fields are dynamic that is they can be changed according to the selection.

Any kind of help or suggestion is really appreciated.

Thanks

Waqas Habib

 

 

2 Answers, 1 is accepted

Sort by
0
Waqas
Top achievements
Rank 1
answered on 25 Apr 2015, 12:42 PM
Please find the attached image here.... :)
0
Polya
Telerik team
answered on 28 Apr 2015, 10:55 AM
Hello Waqas,

Telerik RadPivotGrid is a control used to aggregate records in a concise tabular format. The data can be easily grouped, filtered, sorted and manipulated to create different reports. Lets say we have a field - "Product" and in our ItemsSource the values for this field are: "Pen", "Notebook", "Pencil".
When we group by "Product" (i.e. adding a PropertyGroupDescription for this field in either Rows or Columns) the Row/Column headers that will be generated will contain the records for "Product" and not the field itself. So we will have column or row headers for "Pen", "Notebook", "Pencil" and not for "Product". Unfortunately, this is by design and I cannot propose a way of adding additionally the field name in the RadPivotGrid columns/rows.
I suggest considering using the RadGridView instead: http://docs.telerik.com/devtools/wpf/controls/radgridview/overview2. Also you can take a look at this article for more information and comparison between the RadPivotGrid and the RadGridView: http://docs.telerik.com/devtools/wpf/controls/radpivotgrid/getting-started/started-understanding-pivot

Regards,
Polya
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
PivotGrid
Asked by
Waqas
Top achievements
Rank 1
Answers by
Waqas
Top achievements
Rank 1
Polya
Telerik team
Share this question
or