corelibraries-devexpress-dot-xtrapivotgrid-dot-pivotgridfieldbase-cd6f61e4.md
Gets or sets the name of the database field that is assigned to the current PivotGridFieldBase object.
Namespace : DevExpress.XtraPivotGrid
Assembly : DevExpress.PivotGrid.v25.2.Core.dll
NuGet Packages : DevExpress.PivotGrid.Core, DevExpress.Win.Navigation
[DefaultValue("")]
public virtual string FieldName { get; set; }
<DefaultValue("")>
Public Overridable Property FieldName As String
| Type | Default | Description |
|---|---|---|
| String | String.Empty |
A String value which is the name of the data field.
|
Note
This member is no longer supported in Optimized, OLAP, and Server modes. Use DataSourceColumnBindingBase.ColumnName instead.
Use this property to change the data field that is assigned to the current PivotGridFieldBase object. To specify the text displayed within the field’s header, use the PivotGridFieldBase.Caption property.
In OLAP binding mode, the FieldName property must specify the full name of the bound measure or dimension.
For dimensions, the full name is composed of a dimension’s name, followed by a hierarchy’s name, followed by the name of a level(s). All names should be wrapped within square brackets and separated from one another using the dot symbol. Example: “[Customer].[Customer Geography].[Country]”.
For measures, the full name is composed of the “[Measures].” string followed by the measure’s name. Example: “[Measures].[Sales Amount]”.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FieldName 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.
{
if (e.Field.FieldName == "Sales Person")
{
Private Sub pivotGridControl1_CustomFieldSort(ByVal sender As Object, ByVal e As PivotGridCustomFieldSortEventArgs)
If e.Field.FieldName = "Sales Person" Then
If e.SortLocation = PivotSortLocation.Pivot Then
See Also