Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GridRowClickEventArgs.Column Property

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

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
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