hoangluc19
Programmer
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";
}
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";
}