Skip to content

Commit

Permalink
initialize DataGrid reference first
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Miller committed Dec 29, 2023
1 parent a2f3688 commit b4a35a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Maui.DataGrid/DataGrid.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1285,12 +1285,12 @@ private void InitHeaderView()
{
var col = Columns[i];

col.DataGrid ??= this;

col.InitializeDataType();

col.ColumnDefinition ??= new(col.Width);

col.DataGrid ??= this;

_headerView.ColumnDefinitions.Add(col.ColumnDefinition);

if (!col.IsVisible)
Expand Down

0 comments on commit b4a35a6

Please sign in to comment.