Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load data to combobox by call api

Status
Not open for further replies.

hoangluc19

Programmer
Nov 18, 2019
10
VN
Hello everyone, I have a function to load data into the combobox like this, but it fails to get
the data, hope you guys see how wrong the error in the above 2 lines is without getting the data:

private void getlistVendor()
{
VendorIndexRS vendorIndexRS = apiDocument.GetVendor(new QueryRQ()).Result;
List<VendorDetail> lstData= vendorIndexRS.Data.ToList();

cmbVendor.DataSource =lstData;//cmbVendor.Datasoure=null
cmbVendor.DisplayMember = "Name";
cmbVendor.ValueMember = "Id";
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top