Is there any way to use [DisplayName] defined for each property as fields in a PivotGridControl
?
public class Dto
{
[DisplayName("Identifier")]
public int Id {get;set;}
[DisplayName("Number")]
public string Num {get;set;}
...
//other properties
}
using following code cause show Id and Num as Pivot Fields
, but I expect show Identifire and Number instead:
IList<Dto> result = CreateDtoList();
var bsOrderItems = new BindingSource(DataSource = result);
pivotGridControl.DataSource = bsOrderItems;
pivotGridControl.RetrieveFields();
You can assign display names to
Caption
property of thefield
.For example:
Or you can loop on the
pivotGridControl.Fields
and for eachPivotGridField
set it's caption: