0

状況は次のとおりです。

I binded an Id to a column in a datagrid.
and now i want to pass that Id to row click event of this Datagrid.

1.What is the row click event of Datagrid?

2.How to pass this Id to the event?

任意のガイダンスをいただければ幸いです。

ありがとう

4

1 に答える 1

0

この例では、行インデックスと列インデックスを取得できます

Private Sub DataGridView1_CellMouseClick(sender As [Object], e As DataGridViewCellMouseEventArgs)

    Dim cellInformation As New System.Text.StringBuilder()
    cellInformation.AppendFormat("{0} = {1}", "ColumnIndex", e.ColumnIndex)
    cellInformation.AppendLine()
    cellInformation.AppendFormat("{0} = {1}", "RowIndex", e.RowIndex)
    cellInformation.AppendLine()
    MessageBox.Show(cellInformation.ToString(), "CellMouseClick Event")
End Sub
于 2012-11-23T08:10:11.030 に答える