G
Guest
Hi
I have a standard combo on a WinForm and use the following code to bind it
to a datatable (X returns a datatable object)
Dim X As New BusinessRules.Contracts.Agreements
With cmbAgreement
.DataSource = X.AgreementsByCustomer(66524)
.ValueMember = ("AgreementID")
.DisplayMember = ("Name")
End With
The list is populated correctly, however when the user selects a record I
want to retrieve the "AgreementID" of the "Name" selected.
The value of cmbAgreement.Text is what the user selected but
cmbAgreement.SelectedValue is always Nothing and .SelectedText is always " ".
How can I retrieve the "AgreementID" ?
I have a standard combo on a WinForm and use the following code to bind it
to a datatable (X returns a datatable object)
Dim X As New BusinessRules.Contracts.Agreements
With cmbAgreement
.DataSource = X.AgreementsByCustomer(66524)
.ValueMember = ("AgreementID")
.DisplayMember = ("Name")
End With
The list is populated correctly, however when the user selects a record I
want to retrieve the "AgreementID" of the "Name" selected.
The value of cmbAgreement.Text is what the user selected but
cmbAgreement.SelectedValue is always Nothing and .SelectedText is always " ".
How can I retrieve the "AgreementID" ?