vb.net 中datagridview如何复制粘贴
2个回答
展开全部
新建一个控件测试窗体工程,添加一个DataGridView控件,添加前面我们做的扩展控件DataGridViewExt的引用,并在Form1.Designer.vb文件中中将
Friend WithEvents DataGridView1 As System.Windows.Forms.DataGridView
Me.DataGridView1 = New System.Windows.Forms.DataGridView
分别改为:
Friend WithEvents DataGridView1 As DataGridViewExt.DataGridViewExt
Me.DataGridView1 = New DataGridViewExt.DataGridViewExt
然后就可以从Excel,记事本等程序往DataGridView粘贴数据了.
Friend WithEvents DataGridView1 As System.Windows.Forms.DataGridView
Me.DataGridView1 = New System.Windows.Forms.DataGridView
分别改为:
Friend WithEvents DataGridView1 As DataGridViewExt.DataGridViewExt
Me.DataGridView1 = New DataGridViewExt.DataGridViewExt
然后就可以从Excel,记事本等程序往DataGridView粘贴数据了.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |