Chris,
That is were it made for.
The combobox has a datasource, a displaymember and a valuemember.
The first is the Table Customer, the second your Customer Name, the thirth
your CustomerID
Cor
"Chris Hlade" <(E-Mail Removed)> schreef in bericht
news:74008A3E-7AB3-4A48-9951-(E-Mail Removed)...
>I am trying to do something that I would think would be easy.
>
> I have a dataset that is filled from an XML file.
>
> For simplicity, let's say there are two tables:
>
> - Table Customer has fields CustomerID and CustomerName
> - Table Orders has fields OrderNo, CustomerID, and ItemNo
>
> My DataGridView shows all orders. What I want is the CustomerID column to
> show the customer name and to list all customer names when the user clicks
> the drop-down. Obviously, the associated customer ID should be stored in
> the
> table.
>
> I cannot seem to get this to work and am not having a lot of luck finding
> help online. Can someone give some insight?
>
> Thanks,
> Chris
|