|
-
Apr 13th, 2013, 06:16 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] DataGridview.currentCell()
-
Apr 13th, 2013, 07:13 PM
#2
Re: DataGridview.currentCell()
Don't know what you're missing but we're missing the error messages that might give us a bit of a clue!
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
Apr 13th, 2013, 07:25 PM
#3
Thread Starter
Hyperactive Member
Re: DataGridview.currentCell()
1st error:
Operation is not valid because it results in a reentrant call to the setCurrentAddressCore
2nd error:
object ref not set to an instance of an object
-
Apr 13th, 2013, 07:35 PM
#4
Re: DataGridview.currentCell()
try the _CellClick event:
Code:
Private Sub DataGridView1_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick
If e.ColumnIndex = 0 Then
DataGridView1.CurrentCell = DataGridView1(1, e.RowIndex)
End If
End Sub
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Apr 13th, 2013, 07:49 PM
#5
Re: DataGridview.currentCell()
here's a better solution for you:
Code:
Public Class Form1
Delegate Sub SetColumnIndex()
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
grdparameters.Rows.Add()
End Sub
Private Sub grdparameters_CellEnter(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles grdparameters.CellEnter
If e.ColumnIndex = 0 Then
Dim method As New SetColumnIndex(AddressOf Mymethod)
grdparameters.BeginInvoke(method)
End If
End Sub
Private Sub Mymethod()
grdparameters.CurrentCell = grdparameters.CurrentRow.Cells(1)
'grdparameters.BeginEdit(True)
End Sub
End Class
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Apr 14th, 2013, 01:33 AM
#6
Thread Starter
Hyperactive Member
Re: DataGridview.currentCell()
Thanks .Paul,, this worked 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|