PeterBaileyUk
asked on
vb.net datagrid point
I have a small sub but I cannot see how to set the last part on the second dataview, the first has two columns the last datagrid only one so its complaining of too many arguments but not sure of the syntax.
The saving of the point works as expected
The saving of the point works as expected
Public Sub Reverttosaved()
If SaveLastItemSavedAndApplyToRefreshToolStripMenuItem.Checked = True Then *** works
TxtBulkShortDesc.Focus() *** works
TxtBulkShortDesc.Text = LblLastSavedSearch.Text *** works
SendKeys.Send("{Enter}") *** works
ElseIf GoToLastSavedCellInGridToolStripMenuItem.Checked = True Then *** works
Me.DataGridViewStringsBulk.CurrentCell = Me.DataGridViewStringsBulk.Rows(ptCurrentCell.Y).Cells(ptCurrentCell.X) *** works
If CrossGridToolStripMenuItem.Checked = True Then Me.DataGridViewStrCommon.Rows(ptStrComCurrentCell.Y).Cells(ptStrComCurrentCell.X) *** too many args
End If
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
here is the final working sub for completeness.
Public Sub Reverttosaved()
If SaveLastItemSavedAndApplyToRefreshToolStripMenuItem.Checked = True Then
TxtBulkShortDesc.Focus()
TxtBulkShortDesc.Text = LblLastSavedSearch.Text
SendKeys.Send("{Enter}")
ElseIf GoToLastSavedCellInGridToolStripMenuItem.Checked = True Then
Me.DataGridViewStringsBulk.CurrentCell = Me.DataGridViewStringsBulk.Rows(ptCurrentCell.Y).Cells(ptCurrentCell.X)
If CrossGridToolStripMenuItem.Checked = True Then Me.DataGridViewStrCommon.CurrentCell = Me.DataGridViewStrCommon.Rows(ptStrComCurrentCell.Y).Cells(ptStrComCurrentCell.X)
End If
End Sub
Not a problem Peter, glad to help.
ASKER