Back to Devexpress

GridColumn Class

wpf-devexpress-dot-xpf-dot-grid-3d4123f0.md

latest6.2 KB
Original Source

GridColumn Class

The grid column.

Namespace : DevExpress.Xpf.Grid

Assembly : DevExpress.Xpf.Grid.v25.2.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public class GridColumn :
    GridColumnBase,
    IDetailElement<BaseColumn>,
    IMergeWithPreviousGroup
vb
Public Class GridColumn
    Inherits GridColumnBase
    Implements IDetailElement(Of BaseColumn),
               IMergeWithPreviousGroup

The following members return GridColumn objects:

Remarks

Tip

Topics :

The GridControl displays tabular information in its Views. Data sources use data fields and records to present this information. In the Table View, data fields are represented as columns, and records are displayed as rows. In the Card View, records are represented as cards, and data fields are represented as card fields.

GridColumn objects encapsulate columns and card fields. These objects are stored within the GridControl.Columns collection.

xaml
<dxg:GridControl.Columns>
    <dxg:GridColumn FieldName="ProductName"/>
    <dxg:GridColumn FieldName="UnitPrice"/>
</dxg:GridControl.Columns>

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

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.

how-to-bind-wpf-grid-to-data/CS/CodeBehind/EFCore/LocalData/MainWindow.xaml#L12

xml
</dxg:GridControl.View>
<dxg:GridColumn FieldName="Id" IsSmart="True"
                ReadOnly="True" />

wpf-data-grid-implement-crud-operations/CS/CodeBehind/EFCore/PagedAsyncSource/MainWindow.xaml#L25

xml
</dxg:GridControl.View>
<dxg:GridColumn FieldName="Id" IsSmart="True"
                AllowEditing="True" ReadOnly="True" />

wpf-data-grid-process-frequent-data-updates/CS/ChunkAndOptSummariesExample/MainWindow.xaml#L26

xml
<dxg:GridControl.Columns>
    <dxg:GridColumn FieldName="Name"/>
    <dxg:GridColumn FieldName="Group" GroupIndex="0"/>

wpf-data-grid-extend-crud-operations/CS/DetailCollectionEditing/MainWindow.xaml#L24

xml
</dxg:GridControl.View>
<dxg:GridColumn FieldName="Id" IsSmart="True" ReadOnly="True" />
<dxg:GridColumn FieldName="FirstName" IsSmart="True" />

wpf-data-grid-bind-to-infiniteasyncsource/CS/InfiniteAsyncSourceSample/MainWindow.xaml#L17

xml
<dxg:GridControl.Columns>
    <dxg:GridColumn FieldName="Id" IsSmart="True" AllowEditing="True" Width="*"/>
    <dxg:GridColumn FieldName="Subject" IsSmart="True" AllowEditing="True" Width="2*"/>

Inheritance

Object DispatcherObject DependencyObject ContentElement FrameworkContentElement DXFrameworkContentElement BaseColumn ColumnBase DevExpress.Xpf.Grid.GridColumnBase GridColumn

See Also

GridColumn Members

DevExpress.Xpf.Grid Namespace