Reputation: 1
How to adjust row height in datagrid at runtime in C# .net?
Upvotes: 0
Views: 1013
Reputation: 636
other than loop this event can be used for setting row height in WPF grid.
private void dataGrid1_LoadingRow(object sender, DataGridRowEventArgs e)
{
e.Row.Height = 100.00;
}
Upvotes: 0
Reputation: 54999
Loop through the rows and change it, for example:
foreach (DataGridViewRow row in dataGridView1.Rows)
{
row.Height -= 2;
}
Upvotes: 1