如何在c#中的datagridview中添加新行。 [英] how to add new row in the datagridview in c#.
本文介绍了如何在c#中的datagridview中添加新行。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
datagridview已包含5个空行,我想在0位置添加新行等等...
plzz ,,,,,, AnyOne可以帮助我
datagridview already contains 5 empty rows,i want to add new row at the position 0 and so on...
plzz,,,,,, AnyOne Can Help Me
推荐答案
这里 [ ^ ]
DataGridViewRow row = (DataGridViewRow)yourDataGridView.Rows[0].Clone();
row.Cells["Column2"].Value = "XYZ";
row.Cells["Column6"].Value = 50.2;
yourDataGridView.Rows.Add(row);
courtesy http://stackoverflow.com/questions/10063770/c-sharp -how-to-new-row-to-datagridview-programmingmatically [ ^ ]
这篇关于如何在c#中的datagridview中添加新行。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文