Hey all
I currently have a text box where by the user would enter a product name, in order to save user error a combo box would be more appropriate.
How do I add a combo box in place of this text box? The user will be using the combo box to select a product and submit a bid on this product to the database. The combo box should list all the product names in the database but the productID is to be inserted along with the bid amount and customerID into a table in my database
How would I go about doing this?
Regards
Akin
Add and populate a combo box in a .NET web service
Started by aakinn, Apr 07 2010 04:18 AM
3 replies to this topic
#1
Posted 07 April 2010 - 04:18 AM
|
|
|
#2
Posted 07 April 2010 - 07:01 AM
It almost seems like a drop down list would be more appropriate and you can bind the list with the values that you need. I think you're going to run into too much trouble trying to generate check boxes on the fly during render. You can just grab all the products you need from the database and bind the drop down list.
-CDG10620
Software Developer
Software Developer
#3
Posted 07 April 2010 - 07:33 AM
Silly question but how exactly would I bind the data. The DB is a sdf attached to the project where a table called products is located
I have looked under the combo box properties and guessing I need to use the DataSource property something like this but its not quite picking up the Data binding
this.comboBox1.DataSource = Products.ID;
this.comboBox1.DisplayMember = "Product Name";
I have looked under the combo box properties and guessing I need to use the DataSource property something like this but its not quite picking up the Data binding
this.comboBox1.DataSource = Products.ID;
this.comboBox1.DisplayMember = "Product Name";
#4
Posted 07 April 2010 - 07:52 AM


Sign In
Create Account


Back to top









