Hello
I have a combo box with a list of clients. I need to do search on the the PK to get the details of the client. This worked fine, however the customer wants the combo box to be in sorted order. So i set the property for the combo box to sorted. Now that I have done that the client names are in order but do not corrspond to the value member. In the database the clientID is indentity incremented integer.
in the selectionchangedcommitted event i have this
Is there an easy way to get a PK value form a client that is selected from the combo box. I can't search for the client name, as some clients have the same name. Not unique.
Many thanks in advance,
Steve
I have a combo box with a list of clients. I need to do search on the the PK to get the details of the client. This worked fine, however the customer wants the combo box to be in sorted order. So i set the property for the combo box to sorted. Now that I have done that the client names are in order but do not corrspond to the value member. In the database the clientID is indentity incremented integer.
Code:
Me.cboClients.DataSource = ds1.Tables(0).DefaultView
Me.cboClients.DisplayMember = "Name"
Me.cboClients.ValueMember = "ClientID"
in the selectionchangedcommitted event i have this
Code:
client = Me.cboClients.SelectedValue()
'calls procedures to search for client's details
Is there an easy way to get a PK value form a client that is selected from the combo box. I can't search for the client name, as some clients have the same name. Not unique.
Many thanks in advance,
Steve