Skip to content

Commit

Permalink
Fix DataGrid separator ColumnSpan
Browse files Browse the repository at this point in the history
  • Loading branch information
enisn committed Nov 6, 2023
1 parent 55029ce commit 9dba6af
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/UraniumUI.Material/Controls/DataGrid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private void ItemsSource_CollectionChanged(object sender, NotifyCollectionChange
{
case NotifyCollectionChangedAction.Add:
{
SlideRow(e.NewStartingIndex+1, 2 * e.NewItems.Count);
SlideRow(e.NewStartingIndex + 1, 2 * e.NewItems.Count);

for (int i = 0; i < e.NewItems.Count; i++)
{
Expand Down Expand Up @@ -261,11 +261,7 @@ protected virtual void RemoveRow(int row)
protected virtual void AddSeparator(int row)
{
var line = HorizontalLineFactory() ?? CreateHorizontalLine();

Grid.SetColumnSpan(line, Columns.Count);

_rootGrid.RowDefinitions.Add(new RowDefinition(GridLength.Auto));
_rootGrid.Add(line, 0, row);
_rootGrid.AddWithSpan(line, row, 0, columnSpan: Columns.Count);
}

private void ConfigureGridColumnDefinitions(int columns)
Expand Down

0 comments on commit 9dba6af

Please sign in to comment.