CraigLazar
asked on
populate combo box from dataset
Hi,
Please help with the code below, i have a dataset and i need to filter on 1 of the tables for certain values and then popultae my combo box
here is the code i am using but i am getting the following error
"Cannot bind to the new display member"
ItemName is my field in teh Dataset
'This is for the combo box on the SCI Users pannel
drows = SPds.Tables("lstLookupList ").Select( "Category = 'SCIUsersStatus'") '
With frmMain.cmbSCIUsersStatus
.DataSource = drows
.DisplayMember = "DisplayField"
.ValueMember = "ItemName"
End With
thanks
Please help with the code below, i have a dataset and i need to filter on 1 of the tables for certain values and then popultae my combo box
here is the code i am using but i am getting the following error
"Cannot bind to the new display member"
ItemName is my field in teh Dataset
'This is for the combo box on the SCI Users pannel
drows = SPds.Tables("lstLookupList
With frmMain.cmbSCIUsersStatus
.DataSource = drows
.DisplayMember = "DisplayField"
.ValueMember = "ItemName"
End With
thanks
Do you have a field name DisplayField in your datatable?
ASKER
Hi
i checked that after i posted the code sorry
'This is for the combo box on the SCI Users pannel
drows = SPds.Tables("lstLookupList ").Select( "Category = 'SCIUsersStatus'") '
With frmMain.cmbSCIUsersStatus
.DataSource = drows
.DisplayMember = "ItemName"
.ValueMember = "ItemID"
End With
still same error
i checked that after i posted the code sorry
'This is for the combo box on the SCI Users pannel
drows = SPds.Tables("lstLookupList
With frmMain.cmbSCIUsersStatus
.DataSource = drows
.DisplayMember = "ItemName"
.ValueMember = "ItemID"
End With
still same error
are you sure that ItemName and ItemID are columns in SPds.Tables("lstLookupList ")?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
.databind is only available in ASP.Net. Are you doing a web application?
ASKER
Hi,
Emoreau no its a vb.net fat client that i am using
Emoreau no its a vb.net fat client that i am using
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks for the input