Skip to main content

GridRowClickEventArgs.Column Property

Provides access to the IGridColumn interface (a grid column).

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

public IGridColumn Column { get; }

Property Value

Type Description
IGridColumn

The column.

Remarks

The Column property returns an object that can contain the following data:

  • data about a clicked column (when a user clicks a data row).
  • data about a grid column against which data rows are grouped (when a user clicks a group row).
@inject WeatherForecastService ForecastService

<DxGrid Data="@Data"
        RowClick="OnRowClick"
        AllowGroup="true"
        ShowGroupPanel="true">
    <Columns>
        <DxGridDataColumn FieldName="Date" Caption="Date" />
        <DxGridDataColumn FieldName="TemperatureC" Caption="@("Temp. (\x2103)")" Width="120px" GroupIndex="0"/>
        <DxGridDataColumn FieldName="TemperatureF" Caption="@("Temp. (\x2109)")" Width="120px" />
        <DxGridDataColumn FieldName="Forecast" Caption="Forecast" />
        <DxGridDataColumn FieldName="CloudCover" Caption="CloudCover" GroupIndex="1"/>
    </Columns>
</DxGrid>

@Alert

@code {
    public string Alert { get; set; } = "";
    object Data { get; set; }

    protected override void OnInitialized() {
        Data = ForecastService.GetForecast();
    }

    void OnRowClick(GridRowClickEventArgs e) {
        Alert = $"Data rows are grouped by the {e.Column.Caption} column. ";
    }
}

Grid - Row Click

See Also