Back to Devexpress

LayoutViewColumnCollection.AddField(String) Method

windowsforms-devexpress-dot-xtragrid-dot-columns-dot-layoutviewcolumncollection-dot-addfield-x28-system-dot-string-x29.md

latest2.3 KB
Original Source

LayoutViewColumnCollection.AddField(String) Method

Creates a new column (card field) which is bound to the specified field and appends it to the collection.

Namespace : DevExpress.XtraGrid.Columns

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
public LayoutViewColumn AddField(
    string fieldName
)
vb
Public Function AddField(
    fieldName As String
) As LayoutViewColumn

Parameters

NameTypeDescription
fieldNameString

A String value that specifies the name of the data field to which the created column is bound.

|

Returns

TypeDescription
LayoutViewColumn

A LayoutViewColumn object which represents the new column.

|

Remarks

When a column object is created, a corresponding LayoutViewField object is created. LayoutViewField objects define the layout of fields within the card.

Newly created columns are initially hidden. To make them visible, use the LayoutViewColumn.Visible property or the Move method of a corresponding LayoutViewField object.

See Also

LayoutViewColumnCollection Class

LayoutViewColumnCollection Members

DevExpress.XtraGrid.Columns Namespace