Reputation: 913
In this picture I had used Data grid with AutogeneratedColumn=false
Now how do I remove the white space in this Datagrid.
Upvotes: 0
Views: 1093
Reputation: 37770
Set fill width (*
) for the last column:
<DataGrid.Columns>
<!-- The number of columns -->
<!-- The last column -->
<DataGridTextColumn Width="*"/>
</DataGrid.Columns>
Note, that if you want to share space fill between several columns, you have to set relative fill width:
<DataGrid.Columns>
<!-- The number of columns -->
<DataGridTextColumn Width="40*"/>
<DataGridTextColumn Width="20*"/>
</DataGrid.Columns>
Upvotes: 2