VB.NET - receive value in combobox

Asked By kshama parashar
02-Sep-10 03:16 AM
hello to all
i have tow combobox i want to fill number  in combobox from 1 to 10
suppoes in first combox box i have values 1,2,3,10,5,6,7
now i want to fill values in second combox box these are 4,8,9
 in vb.net window application

  Sagar P replied to kshama parashar
02-Sep-10 03:50 AM
You can use this for same;

You can use FindString method of combo box like;

For i As Integer = 1 To 10

  If ComboBox1.FindString(i.ToString()) = -1 Then

    ComboBox2.Items.Add(i)

  End If

Next

  kshama parashar replied to Sagar P
02-Sep-10 04:35 AM
thanks its working
  kshama parashar replied to Sagar P
02-Sep-10 04:35 AM
thanks its working
Create New Account
help
types? (B) What is concept of Boxing and Unboxing ? (B) What is the difference between VB.NET and C#? (I) what is the difference between System exceptions and Application exceptions? (I)What are different properties provided by Object-oriented systems? (B) How can we achieve inheritance in VB.NET? (I) what are abstract classes? (B) What is a Interface? (A) What is difference between prevent a class from overriding? (I) what is the use of “Must inherit” keyword in VB.NET? (I) Do interface have accessibility modifier. (A) What are similarities between Class and structure? (A between Class and structure’s? (B) What does virtual keyword mean? (B) What are shared (VB.NET) / Static(C#) variables? (B) What is Dispose method in .NET? (B) What is the use
Dependent combo boxes I am new to vb in particular and programming in general. Help!!! I have three combo boxes drawing data from one table; How do I get the combo boxes to display the data depending on the selection from one combo box etc. Hi, Acutally I dont work in vb.net but in c#. Ill give you solution its quite easy. This is nothing but selected index changed event of your first combobox. Just you got to see how to bind in vb.net which is easy rest
combobox in vb net i need a drop down in a form, but i would also like to be if there are items as m, ma, mahe, mahesh, monika, amit, a, aa in the combobox then when i type in the combobox string 'm' then either all the itmes should b shown with focus on 'm' or u got my point, i need this soon thx in advance. http: / / www.thecodeproject.com / vb / net / autocomplete_combobox.asp http: / / www.gotdotnet.com / Community / UserSamples / Details.aspx?SampleGuid = 30138e02-c2c3-41cd-bc6a hi suneetha, wat u have given was in asp.net but i needed it in vb.net, and i want is that when the user types in a string in a
Retrieve to a text box Hi I'm totally beginner to VB.net, i'm trying write a Select query, cmbi_code change Event I_name.text = ("select i_name from is when we selecting item code, item name should come to the Item Name text box. anyone please help me to do this. Hi, Use the below code conn = New SqlConnection End Try hi, you need to use ado.net command to connect the database in vb.net here is the code for you 1. mycommand.Commandtext = "Select i_name FROM New_item WHERE I_code Thanks, Srini. hi now i'm going to save all the data from the text box to my data base. this is the code grf.Fill(ds1, "GRF") grf.InsertCommand = New work thanks. the thing is i want display that Auto number to Invoice No text box.then user can see that Invoice no. How can i do that. thanks. Hi, If
datagridview VB.NET display data in datagridviewtextboxcolumn depending on datagridviewcombobox selection in datagridview in vb.net code the DataGridViewComboBoxColumn doesn't expose a SelectedIndexChanged Event. In order to catch an index this link - http: / / vbcity.com / forums / p / 165337 / 705301.aspx I don't have the VB.Net version, but hopefully this quick C# snippet will help you or point you in the DataGridView with 2 columns. The first being a DataGridViewComboBox populated with two choices: "Text" or "Combo". The second column is initially set to DataGridViewTextBoxColumn from the designer. I handle the CurrentCellDirtyStateChanged DataGridView. I check if the cell is dirty and only check the first column (The ComboBox). You gotta call the CommitEdit to get the new value in the combo or else