Skip to content

Commit

Permalink
use SetColumn from the Grid object itself
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Miller committed Jan 24, 2024
1 parent 971c5aa commit c0ebefd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Maui.DataGrid/DataGrid.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1443,15 +1443,14 @@ private void InitHeaderView()

if (cell.Column != col)
{
Grid.SetColumn(col.HeaderCell, i);
_headerView.SetColumn(col.HeaderCell, i);
}
}
else
{
Grid.SetColumn(col.HeaderCell, i);
_headerView.SetColumn(col.HeaderCell, i);
_headerView.Children.Add(col.HeaderCell);
}

}

// Remove extra columns, if any
Expand Down

0 comments on commit c0ebefd

Please sign in to comment.