assign combobox value to a textbox

-z-

New member
Joined
Nov 23, 2007
Messages
3
Programming Experience
Beginner
assign combobox value to a datagrid

i need to assign the value i have selected in a combo box into a text box and this command is placed in a save button... how can i do that ??? something like below...


TextBox1.Text = EmpIDCboBox.SelectedValue

this can assign adi .. .i need to put the value into the Datagrid
as display as picture below ... where i need to get the combobox value and assign it to the grid ... like

employee ID in the combobox will be assigned to the employee ID in the grid ...
this goes same to the Operator ID
and call time...

which means i need to extract the value from the combo box and put them into the datagrid ... the picture will show how it looks like...

and this is the code ... of my program...


Public Class Form2


Private Sub CallTimeBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CallTimeBindingNavigatorSaveItem.Click
Me.Validate()
Me.CallTimeBindingSource.EndEdit()
Me.CallTimeTableAdapter.Update(Me.EMP_OP_DataSet.CallTime)

End Sub

Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

'TODO: This line of code loads data into the 'EMP_OP_DataSet._Operator' table. You can move, or remove it, as needed.
Me.OperatorTableAdapter.Fill(Me.EMP_OP_DataSet._Operator)
'TODO: This line of code loads data into the 'EMP_OP_DataSet.Employee' table. You can move, or remove it, as needed.
Me.EmployeeTableAdapter.Fill(Me.EMP_OP_DataSet.Employee)
'TODO: This line of code loads data into the 'EMP_OP_DataSet.CallTime' table. You can move, or remove it, as needed.
Me.CallTimeTableAdapter.Fill(Me.EMP_OP_DataSet.CallTime)

'Me.BindingNavigatorAddNewItem
' If Me.RecordPos > Me.myBindingSource.Position Then

End Sub




Private Sub Save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Save.Click

'Me.CallTimeBindingSource.Add(EmpIDCboBox.SelectedValue)



End Sub


End Class

any help will be appriciated... thx
 

Attachments

  • formafter.JPG
    formafter.JPG
    72.9 KB · Views: 40
Last edited:
This seems to be something very similar to a problem i have. Does anyone have any solutions?

Regards
 
Back
Top