| | |
About Combo BOx
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2008
Posts: 34
Reputation:
Solved Threads: 0
Good Morning Friends
I Am Using VB.net,I am doing code for search button & it's working for textboxes but not for combobox,accualy when it get any value so it shows on textbox by using
textbox1.text=ds.tables(0).rows(0).item(0)
& it shows but when i use
combobox.text =ds.tables(0).rows(0).item(0)
it doesn't show any value but when i wright
combobox.selecteditem==ds.tables(0).rows(0).item(0)
it works but execution get transfer because i have wroght code on comboboxselectedindexchanged
please give me any solution
I Am Using VB.net,I am doing code for search button & it's working for textboxes but not for combobox,accualy when it get any value so it shows on textbox by using
textbox1.text=ds.tables(0).rows(0).item(0)
& it shows but when i use
combobox.text =ds.tables(0).rows(0).item(0)
it doesn't show any value but when i wright
combobox.selecteditem==ds.tables(0).rows(0).item(0)
it works but execution get transfer because i have wroght code on comboboxselectedindexchanged
please give me any solution
Maybe that because there is already items in the combo, so Try to add the value you want to the combo first
hth
vb.net Syntax (Toggle Plain Text)
ComboBox.Items.Add(ds.tables(0).rows(0).item(0)) ComboBox.Text = ds.tables(0).rows(0).item(0)
hth
you could create a flag such as Dim bIsCodeNeedToRunTrue As Boolean and set to true when you want the code in the cobbobox_selected_indexchanged to be executed and to false when not.
or you could transfer the code from the cobbobox_selected_indexchanged to click() and this way you can control if you want to the code need to be run or no, if you change the combo by mouse the code will run , if you change the code programming, you can issue
hth
or you could transfer the code from the cobbobox_selected_indexchanged to click() and this way you can control if you want to the code need to be run or no, if you change the combo by mouse the code will run , if you change the code programming, you can issue
vb.net Syntax (Toggle Plain Text)
ComboBox.Text = ds.tables(0).rows(0).item(0) ComboBox.click() ' or remove this line for not executing the code
hth
![]() |
Similar Threads
- combo box (PHP)
- Want to use radio button or menu bar instead of combo box (Java)
- combo box (ASP)
- How do I limit text char in Combo box? (VB.NET)
- combo box help (VB.NET)
Other Threads in the VB.NET Forum
- Previous Thread: ListView
- Next Thread: DataGridView ComboBoxColumn Scenario!! Help!!
| Thread Tools | Search this Thread |
.net .net2008 2008 access account advanced application array basic beginner browser button buttons center click code combo cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic excel exists fade filter forms generatetags gridview html images input insert intel internet listview map mobile module monitor msaccess net number objects open panel passingparameters pdf picturebox picturebox2 port position print printing problem regex remove right-to-left save search searchvb.net select serial settings shutdown socket sqldatbase sqlserver survey temperature textbox timer timespan transparency txttoxmlconverter update user usercontol vb vb.net vb.netformclosing()eventpictureboxmessagebox vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web winforms wpf wrapingcode xml year





