At some point I need the record ID from the row I select to do something with it.
I have scoured the internet, found tons of examples which no longer work in net 4.0. or options that evidently were in 2008 or 2006 or ??? but don't work anymore, don't have the same arguments are not the right data type? etc etc.
It might have something to do with datakeys although I have not found anything that works.
I want the Student_ID which is in column 2 of a particular row I click the command button in that row.
This code works in VB.NET 2010
but the grid view in ASP.NET 4.0 does not support e.RowIndex or e.row.rowindex ??? which it used to.
Does anyone know how to do the same thing ASP.NET 4.0 VB code?
TIA
DougP
I have scoured the internet, found tons of examples which no longer work in net 4.0. or options that evidently were in 2008 or 2006 or ??? but don't work anymore, don't have the same arguments are not the right data type? etc etc.
It might have something to do with datakeys although I have not found anything that works.
I want the Student_ID which is in column 2 of a particular row I click the command button in that row.
This code works in VB.NET 2010
Code:
Private Sub DataGridView1_RowEnter(sender As Object, e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.RowEnter
Me.txtStudentID.Text = Me.DataGridView1.Rows(e.RowIndex).Cells("Student_ID").Value
Me.txtLastname.Text = Me.DataGridView1.Rows(e.RowIndex).Cells("Lastname").Value
Does anyone know how to do the same thing ASP.NET 4.0 VB code?
TIA
DougP