How can I set the caption of the Row Area
in the attached, I have set the caption of "Carton Num" to "Carton" and the "Style.Style Number" to "Style"
How can I set the caption of the Row Area
in the attached, I have set the caption of "Carton Num" to "Carton" and the "Style.Style Number" to "Style"
Hello,
You can accomplish this task by customizing ASPxPivotGrid's field captions in code. For example, you can create an ASPxPivotGridListEditor's descendant and override its SetupPivotGridFieldCaption method:
C#using System;
using DevExpress.ExpressApp.Editors;
using DevExpress.ExpressApp.Model;
using DevExpress.ExpressApp.PivotGrid.Web;
using DevExpress.ExpressApp.Utils;
namespace Solution1.Module.Web {
[ListEditor(typeof(Object), false)]
public class MyASPxPivotGridListEditor : ASPxPivotGridListEditor {
public MyASPxPivotGridListEditor(IModelListView model)
: base(model) {
}
protected override void SetupPivotGridFieldCaption(DevExpress.XtraPivotGrid.PivotGridFieldBase field, DevExpress.ExpressApp.DC.IMemberInfo memberInfo) {
base.SetupPivotGridFieldCaption(field, memberInfo);
if (memberInfo.GetPath().Count > 1) {
field.Caption = CaptionHelper.GetMemberCaption(memberInfo.LastMember);
}
}
}
}
Then, invoke the Model Editor of the XAFML file, where the ASPxPivotGridListEditor editor is specified, locate the required ListView and set its EditorType to MyASPxPivotGridListEditor.
Feel free to contact us if you need further assistance.
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.