新增一行的DataGridView的WinForm的底部 [英] Add new row at bottom of datagridview in Winform
本文介绍了新增一行的DataGridView的WinForm的底部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在WinForm应用程序一个DataGridView。当我点击添加按钮,我想一个空白行,在datagridview的底部插入。
I have a datagridview in Winform application. When I click on add button I want a blank row to be inserted at the bottom of datagridview.
我想这一个:
dataGridView1.Rows.Add(row);
不过空白行插入顶部不在底部。有什么办法在底部插入?
But blank row is inserted at top not at the bottom. Is there any way to insert it at the bottom?
推荐答案
您可以使用插入
方法:
dataGridView1.Rows.Insert(dataGridView1.Rows.Count-1, row);
这篇关于新增一行的DataGridView的WinForm的底部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文