如何在datagridview中处理click事件? [英] how to handle click event in datagridview?
本文介绍了如何在datagridview中处理click事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望当我点击datagridview项目时...它应该在其他datagridview中显示不同的表。它可能吗?....任何人都可以发布简单的代码吗?
I want that when i click on datagridview item...it should show different table in other datagridview.is it possible?....can anyone post simple code for it?
推荐答案
Private Sub DataGrid1_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGrid1.CellClick
If Me.DataGrid1.Rows.Count > 0 Then
Me.DataGrid2.Item(0, 0).Value = Me.DataGrid1.CurrentCell.Value
End If
End Sub
这篇关于如何在datagridview中处理click事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文