G
Guest
Hello,
I want to apply custom styles on differents rows or columns.
On the DataGrid control there was the TableStyles collection, I haven't see
any equivalent feature...
For example, I want to change rows' height in function of a value (int)
given by user.
The RowTemplate is used only when rows are added. I cannot change existing
rows by changing the row template...
This code works, it change all rows height automaticaly, but it needs to
iterate on each rows...
foreach (DataGridViewRow r in this.dataGridView1.Rows)
{
r.Height = value;
}
before, with the DataGrid, I was using something like that :
myDataGrid.TableStyles(0).PreferredRowHeight = value
I want also change column styles without iterating, just by attribuate a
style to a column...
There is a lot of other things I want to do with styles.
Thank you for helping me )
I want to apply custom styles on differents rows or columns.
On the DataGrid control there was the TableStyles collection, I haven't see
any equivalent feature...
For example, I want to change rows' height in function of a value (int)
given by user.
The RowTemplate is used only when rows are added. I cannot change existing
rows by changing the row template...
This code works, it change all rows height automaticaly, but it needs to
iterate on each rows...
foreach (DataGridViewRow r in this.dataGridView1.Rows)
{
r.Height = value;
}
before, with the DataGrid, I was using something like that :
myDataGrid.TableStyles(0).PreferredRowHeight = value
I want also change column styles without iterating, just by attribuate a
style to a column...
There is a lot of other things I want to do with styles.
Thank you for helping me )