|
-
April 26th, 2010, 05:54 AM
#1
Textbox populate
Hi,
I have a textbox called txtProjname , I also have a combobox called cmbactiveproj. cmbactiveproj is populated from a dataset called activeprojects. This shows a dropdown list of all the projects.
The dataset which loads the combobox is read from the dataset shown below;
Code:
Me.ActiveprojectsTableAdapter.FillBy(Me.Dsactiveprojects.activeprojects)
Now, I want to populate txtProjname with the project when a project is clicked at the cmbactiveproj. So I have the folowing code;
Code:
Private Sub cmbactiveproj_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbactiveproj.Click
txtProjname.Clear()
txtProjname.Text = cmbactiveproj.Text
End Sub
The above code reads the previous clicked project and populates it to txtProjname not the current project. Any help please..
Thanks
-
April 26th, 2010, 07:36 AM
#2
Re: Textbox populate
Have you tried using the selecteditem property instead?
Always use [code][/code] tags when posting code.
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
|