aspnet-devexpress-dot-web-dot-gridviewcolumn.md
Provides access to a collection of columns that the current column combines.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
public GridViewColumnCollection Columns { get; }
Public ReadOnly Property Columns As GridViewColumnCollection
| Type | Description |
|---|---|
| GridViewColumnCollection |
An GridViewColumnCollection object that is a collection of columns grouped by the current column.
|
The Columns property stores a collection of GridViewColumn objects. This allows you to create data cell bands. The obtained column collection provides methods that allow you to add new and remove existing columns. Individual columns can be accessed using indexed notation.
In markup:
<dx:ASPxGridView ID="Grid" runat="server" ...>
<Columns>
<dx:GridViewDataColumn FieldName="Address">
<Columns>
<dx:GridViewDataColumn FieldName="Features">
<Columns>
<dx:GridViewDataColumn FieldName="Beds" />
...
</Columns>
</dx:GridViewDataColumn>
...
</Columns>
</dx:GridViewDataColumn>
</Columns>
</dx:ASPxGridView>
In code:
ASPxGridView grid1 = new ASPxGridView();
grid1.ID = "grid1";
Page.Form.Controls.Add(grid1);
...
GridViewDataColumn address = new GridViewDataColumn();
address.FieldName = "Address";
GridViewDataColumn features = new GridViewDataColumn();
features.FieldName = "Features";
GridViewDataColumn beds = new GridViewDataColumn();
beds.FieldName = "Beds";
address.Columns.Add(features);
features.Columns.Add(beds);
ASPxGridView - How to create header and data cell bands
ASPxGridView - Data Cell Bands
ASPxGridView - Data Cell Bands
See Also