| | |
About Combo BOx
Please support our VB.NET advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
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!!
Views: 473 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
"crystal .net .net2005 30minutes 2008 access add application array assignment basic binary box button buttons center click code connectionstring convert cpu data database databasesearch datagrid datagridview design designer dissertation dissertations dissertationthesis dll dosconsolevb.net editvb.net employees error excel exists firewall folder image images isnumericfuntioncall listview login math memory mobile module msaccess mssqlbackend mysql navigate net opacity page pan peertopeervideostreaming picturebox plugin port print printing printpreview problem record refresh regex reports" reuse save savedialog serial sorting sql sqldatbase storedprocedure string structures studio temp textbox timer upload useraccounts usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet vista visual visualbasic visualbasic.net visualstudio2008 web wpf xml





