1.11M Members

different itemsource for a combobox than the bound datasource


I am trying to use a combobox in a windows form for windows CE mobile device with sql server compact installed. I am using visual studio 2008.
I have two sdf databases - MobileArticles.sdf and MobileOrders.sdf
MobileArticles.sdf has a table Articles(name, weight,barcode,...) and a table Clients(ClientID)
MobileOrders.sdf has only one table Orders (OrderID, ClientID, name, weight, barcode, amount,...)
MyForm has textboxes for all the fields of the Orders table except for ClienID, which is a combobox.

I can not bind the combobox so that it shows the values from the MobileArticles.sdf->Clients->ClientID field and in the same time to Insert the ClientId in the MobileOrders.sdf ->Orders with the new record.

I suppose the answer is very simple but i couldn't find it. Please Help


What method did you use to databind the combobox?

Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'GrivasMobileArticlesDataSet.Clients' table. You can move, or remove it, as needed.
        'TODO: This line of code loads data into the 'GrivasMobileOrdersDataSet.orders' table. You can move, or remove it, as needed.

    End Sub

This is the loading sub for the form that contains the combobox.
Attached is a picture with the properties of the combobox.

Attachments combobox_properties.JPG 149.6KB
This article has been dead for over six months: Start a new discussion instead
Start New Discussion
View similar articles that have also been tagged: