How to adjust row height in datagrid at runtime in C# .net?

How to adjust row height in datagrid at runtime in C# .net?

Upvotes: 0

Views: 1013

Answers (2)

Asad Naeem
Asad Naeem

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

Hans Olsson
Hans Olsson

Reputation: 54999

Loop through the rows and change it, for example:

foreach (DataGridViewRow row in dataGridView1.Rows)
{
    row.Height -= 2;
}

Upvotes: 1

Related Questions