DxDataGridColumn Class

A data column with a text editor.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.dll

Declaration

public class DxDataGridColumn :
    DxDataGridColumnBase,
    IDataGridColumn

Remarks

The DataGrid allows you to display data in a tabular format. The grid gets data from data sources that store data using data fields and records. The grid displays data fields as columns and records as rows. The DxDataGridColumn class provides a base API for classes that represent data columns.

Use the Data and Field properties to bind a column to a data source field. For more information, refer to Bind to Data Sources.

You can also manage column visibility. To hide a column from a data grid, set its Visible property to false.

Note

The columns are added at design time. You cannot change the column collection at runtime.

<DxDataGrid Data="@forecasts">   
    <DxDataGridColumn Field="@nameof(ProductFlat.Id)" Visible="false"></DxDataGridColumn>
    <DxDataGridColumn Field="@nameof(WeatherForecast.TemperatureC)" Caption="Temp. (C)"></DxDataGridColumn>
    <DxDataGridSpinEditColumn Field="@nameof(WeatherForecast.TemperatureF)" Caption="Temp. (F)"></DxDataGridSpinEditColumn>
    <DxDataGridComboBoxColumn Field="@nameof(WeatherForecast.Summary)" Caption="Summary" Data=@summaries></DxDataGridComboBoxColumn>
    <DxDataGridDateEditColumn Field="@nameof(WeatherForecast.Date)"></DxDataGridDateEditColumn>
</DxDataGrid>

Note

Online Demo: Data Grid - Column Types

See Also