Skip to content

Commit f1864c2

Browse files
Copilotvnbaaij
andcommitted
Add public Columns property to FluentDataGridRow and FluentDataGridCell classes
Co-authored-by: vnbaaij <1761079+vnbaaij@users.noreply.github.com>
1 parent 8ba2a8e commit f1864c2

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/Core/Components/DataGrid/FluentDataGridCell.razor.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ public partial class FluentDataGridCell<TGridItem> : FluentComponentBase
6060
/// </summary>
6161
protected FluentDataGrid<TGridItem> Grid => InternalGridContext.Grid;
6262

63+
/// <summary>
64+
/// Gets the columns associated with this data grid cell.
65+
/// </summary>
66+
public IReadOnlyList<ColumnBase<TGridItem>> Columns => Grid._columns;
67+
6368
protected string? ClassValue => new CssBuilder(Class)
6469
.AddClass("column-header", when: CellType == DataGridCellType.ColumnHeader)
6570
.AddClass("select-all", when: CellType == DataGridCellType.ColumnHeader && Column is SelectColumn<TGridItem>)

src/Core/Components/DataGrid/FluentDataGridRow.razor.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ public partial class FluentDataGridRow<TGridItem> : FluentComponentBase, IHandle
6363
/// </summary>
6464
protected FluentDataGrid<TGridItem> Grid => InternalGridContext.Grid;
6565

66+
/// <summary>
67+
/// Gets the columns associated with this data grid row.
68+
/// </summary>
69+
public IReadOnlyList<ColumnBase<TGridItem>> Columns => Grid._columns;
70+
6671
protected string? ClassValue => new CssBuilder(Class)
6772
.AddClass("fluent-data-grid-row")
6873
.AddClass("hover", when: Grid.ShowHover)

0 commit comments

Comments
 (0)