替换数据网格中的行 [英] Replace Rows in datagrid

查看:50
本文介绍了替换数据网格中的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


如何替换datagridview中的行?
提前谢谢.
来自,
Sanang

Hi,
How to replace rows in datagridview?
Thanks in advance.
From,
Sanang

推荐答案

我知道为时已晚,但这仍然可能会有所帮助. 您想要这样的东西吗?!

I know it''s too late, still this might help..
You want something like this?!

Private Sub ReplaceRowAt(ByVal index As Integer, ByVal replaceWith As DataGridViewRow, ByRef dgv As DataGridView)
  dgv.Rows.RemoveAt(index)
  dgv.Rows.Insert(index, replaceWith)
End Sub


这篇关于替换数据网格中的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆