开发者

how to increase rows size in DataGridView

How to increase rows size in DataGridView using C#? I can't find this property .

Thanks 开发者_StackOverflowin advance.


You can always loop through all DataGridViewRows 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜