Tuesday, 6 August 2013

On lable focus enter press to raise event

On lable focus enter press to raise event

I'm trying to get this sub to execute when my lable has focus and someone
clicks "Enter" This is the code I have so far...
Private Sub AssignOwnersLabel_Click() Handles AssignOwnersLabel.Click
Dim repository As OwnerRepositorySvc.OwnerRepositoryClient = Nothing
For Each programRow As DataGridViewRow In ProgramOwnerFill.SelectedRows
programRow.Cells(0).Value = AssignOwnersTXTBox.Text
Next
repository = OpenRepository()
repository.SaveOwners(_ds)
_ds.AcceptChanges()
CloseRepository(repository)
Dim dataview As DataView = _ds.ProgramOwners.DefaultView
dataview.Sort = _ds.ProgramOwners.EmployeeIDColumn.ColumnName
Me.ProgramOwnersBindingSource.DataSource = dataview
End Sub
I think to get this to work I need to do something with "keychar" but I'm
not sure how that would look. Thanks for help!

No comments:

Post a Comment