By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,166 Members | 1,575 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,166 IT Pros & Developers. It's quick & easy.

Dataview cell value

P: n/a
Hello,
I am a newbi to this fourm and to vb.net.... moving from vb classic.
Testing with a database connection, got my data in the dataview control.
But now, I want to be able to double click a row and return a value from a
cell. Something like what use to be the textmatrix in MSHFlex grid.
How would I do that?
Brian
Feb 9 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

Handle the rowheadermousedoubleclick event to get the value of a
column when the row header is double clicked and the cellmousedoubleclick
event to get the value when a cell is double clicked.

Private Sub DataGridView1_RowHeaderMouseDoubleClick(ByVal sender As
Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArg s)
Handles DataGridView1.RowHeaderMouseDoubleClick
MessageBox.Show(DataGridView1.Item(0, e.RowIndex).Value.ToString)
End Sub
Private Sub DataGridView1_CellMouseDoubleClick(ByVal sender As Object,
ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArg s) Handles
DataGridView1.CellMouseDoubleClick
If e.ColumnIndex < 0 Or e.RowIndex < 0 Then Return
MessageBox.Show(DataGridView1.Item(e.ColumnIndex,
e.RowIndex).Value.ToString)
End Sub
Ken
----------------
"Brian Shafer" <Br*********@discussions.microsoft.com> wrote in message
news:D5**********************************@microsof t.com...
Hello,
I am a newbi to this fourm and to vb.net.... moving from vb classic.
Testing with a database connection, got my data in the dataview control.
But now, I want to be able to double click a row and return a value from a
cell. Something like what use to be the textmatrix in MSHFlex grid.
How would I do that?
Brian

Feb 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.