DataGrid中的数据放在TEXT中有关咋样写呢
在点击DataGrid中的一行后 把该行中指定的拿列显示在TEXT中应该咋样写啊 还有那个点击事件是什么啊
[解决办法]
Private Sub DataGrid1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim RowValue, ColValue
RowValue = DataGrid1.RowContaining(Y)
ColValue = DataGrid1.ColContaining(X)
If RowValue >= 0 And RowValue <= DataGrid1.VisibleRows And _
ColValue >= 0 And ColValue <= DataGrid1.Columns.Count Then
DataGrid1.Row = RowValue
Text1.Text = DataGrid1.Columns(ColValue) '
End If
End Sub