corelibraries-devexpress-dot-pivotgrid-dot-databinding-dot-datasourcecolumnbindingbase.md
Gets or sets the name of the data source column.
Namespace : DevExpress.PivotGrid.DataBinding
Assembly : DevExpress.PivotGrid.v25.2.Core.dll
NuGet Packages : DevExpress.PivotGrid.Core, DevExpress.Win.Navigation
[DefaultValue("")]
public string ColumnName { get; set; }
<DefaultValue("")>
Public Property ColumnName As String
| Type | Default | Description |
|---|---|---|
| String | String.Empty |
A String that is the name of the column in the data source.
|
The following code shows how to specify a column name for a field:
<DataBindingSerializable>
<dx:DataSourceColumnBinding ColumnName="OrderDate" GroupInterval="DateMonth" />
</DataBindingSerializable>
</dx:PivotGridField>
</Fields>
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ColumnName 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.
winforms-pivot-grid-connect-to-an-olap-datasource/CS/WinOlapRetrieveFieldsExample/Form1.cs#L27
foreach (PivotGridField field in pivotGridControl1.Fields){
field.Name = "field" + (field.DataBinding as DataSourceColumnBinding).ColumnName;
}
winforms-pivot-grid-connect-to-an-olap-datasource/VB/WinOlapRetrieveFieldsExample/Form1.vb#L28
For Each field As PivotGridField In pivotGridControl1.Fields
field.Name = "field" & TryCast(field.DataBinding, DataSourceColumnBinding).ColumnName
Next
See Also
DataSourceColumnBindingBase Class