How to increase rows size in DataGridView using C#? I can't find this property .
Thanks 开发者_StackOverflowin advance.
You can always loop through all DataGridViewRow
s and set the Height
property:
foreach (DataGridViewRow row in dataGridView1.Rows) {
if (heightShouldBeSet) {
row.Height = yourHeightSetting;
}
}
You need to add a new Row.
int n = dataGridView1.Rows.Add();
dataGridView1.Rows[n].Cells[0].Value = title;
dataGridView1.Rows[n].Cells[1].Value = dateTimeNow;
If you want to increase the row height you can also just contatenate empty line to the cell value.
精彩评论