We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ComboBoxBase and DataBindings

Thread ID:





36683 Nov 7,2005 04:47 PM UTC Nov 9,2005 09:19 PM UTC WinForms 2
Tags: Tools
Chad Elliot
Asked On November 7, 2005 04:47 PM UTC

I am trying to bind a data set to a combo box which has a grid for the drop down list. I have created a GridListControl and then bound it to a ComboBoxBase. I added a databinding for the grid list control. When I run the program, the binding to the GridListControl appears to work because the correct row is highlighted, but the correct value is not displayed in the ComboBoxBase. I tried to bind the data set to the ComboBoxBase, but I could not figure out which property to bind to. Is it possible to accomplish this with the GridListContorl and the ComboBoxBase or do I need to use a different control? Thanks, Chad

Anupama Roy [Syncfusion]
Replied On November 9, 2005 05:10 AM UTC

Hi Chad, Sorry for the delayed response. I have attached a sample that shows how to bind the data set to the ComboBoxBase with GridListControl as its drop-down. Hope this helps you. Please let me know if you have any questions. Thanks for your interest in Syncfusion products. Best Regards, Anu


Chad Elliot
Replied On November 9, 2005 09:19 PM UTC

Sorry, I don’t think I made myself clear enough in my initial post. Here is a sample scenario of what I am trying to accomplish using the Northwind database. I have a Products form, which shows one record from the Products table at a time. The form contains navigation buttons so the user can scroll through the records in the Products table. I have bound each control on the form to the data set that contains the data from the Products table. The code that I used to bind looks like this: txtProductID.DataBindings.Add("Text", MyDataSet.Tables("Products"), "ProductID") For the SupplierID field, I would like to have a combo box display the CompanyName from the Suppliers table instead of the SupplierID. I have created a ComboBoxBase which is bound to a GridListControl. The GridListControl shows all columns from the Suppleirs table. How do I bind the combo box to the Products table so when user navigates through the records in the Products tale, the correct CompanyName displays in the combo box? I have attached a sample so you can see what I have done so far. Thanks, Chad



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon