swethajain
Well-known member
- Joined
- Feb 1, 2010
- Messages
- 48
- Programming Experience
- Beginner
Hi,
I have an application in which i have a combobox and i filled it with data from the database using this code.
Dim str_Project As String = "SELECT * FROM Project_details"
Dim da_Project As New OleDbDataAdapter(str_Project, myConnection)
Dim ds_Project As New DataSet
da_Project.Fill(ds_Project, "Project_details")
With cbx_Goto
.DataSource = ds_Project.Tables("Project_details")
.DisplayMember = "Project_Name"
.SelectedIndex = 0
.ValueMember = "Id"
End With
Now i am trying to print the selected value of combobbox into a textbox when the selected index changes.selecteditem,selectedtext everything i have used these are the errors that are coming
promot cannot be converted to string
system.data.datarowview value is coming when cbx_goto.selectedItem is given
I have an application in which i have a combobox and i filled it with data from the database using this code.
Dim str_Project As String = "SELECT * FROM Project_details"
Dim da_Project As New OleDbDataAdapter(str_Project, myConnection)
Dim ds_Project As New DataSet
da_Project.Fill(ds_Project, "Project_details")
With cbx_Goto
.DataSource = ds_Project.Tables("Project_details")
.DisplayMember = "Project_Name"
.SelectedIndex = 0
.ValueMember = "Id"
End With
Now i am trying to print the selected value of combobbox into a textbox when the selected index changes.selecteditem,selectedtext everything i have used these are the errors that are coming
promot cannot be converted to string
system.data.datarowview value is coming when cbx_goto.selectedItem is given