Skip to main content

PivotGridFieldBase.Name Property

Gets or sets the field’s name.

Namespace: DevExpress.XtraPivotGrid

Assembly: DevExpress.PivotGrid.v22.2.Core.dll

NuGet Packages: DevExpress.PivotGrid.Core, DevExpress.Win.Dashboard.Design

Declaration

[Browsable(false)]
[DefaultValue("")]
public virtual string Name { get; set; }

Property Value

Type Default Description
String String.Empty

A string which specifies the field’s name.

Remarks

PivotGridFieldBase objects can be directly accessed in code by their names.

Use the Name property to assign a name to a PivotGridFieldBase object created at runtime. This name can be used to determine fields in a stored layout. For example, the following code snippet sets field names for all fields in the Pivot Grid:

pivotGridControl1.RetrieveFields();
foreach(PivotGridField field in pivotGridControl1.Fields)
field.Name = "field" + (field.DataBinding as DataSourceColumnBindingBase).ColumnName;

To retrieve a field from the control’s field collection by its name use the PivotGridFieldCollectionBase.GetFieldByName method.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Name property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also