| | |
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 |
"crystal .net .net2005 30minutes 2008 access add arithmetic array assignment basic binary bing box button buttons center code combobox component connectionstring convert cpu data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net editvb.net employees excel file-dialog firewall folder google hardcopy image images isnumericfuntioncall listview login math memory mobile module ms mssqlbackend mysql navigate net networking opacity output pan peertopeervideostreaming picturebox picturebox1 plugin port print printpreview problemwithinstallation project record reports" reuse save savedialog serial sorting sql storedprocedure string temp text textbox timer toolbox updown upload useraccounts usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vbnet view vista visual visualbasic visualbasic.net visualstudio web wpf





