Combox load & Listview load for our application is one of the most important task in our Development.
For ComboBox:
private void LoadVendorTYpeComboBox()
{
vendorTYpecomboBox.Items.Clear();
ObjVendorTypeList = ObjBvendorType.GetAllVendirType();
foreach (EVendorType obj in ObjVendorTypeList)
{
vendorTYpecomboBox.Items.Add(obj.VendorType);
}
}
For ComboBox:
private void LoadVendorTYpeComboBox()
{
vendorTYpecomboBox.Items.Clear();
ObjVendorTypeList = ObjBvendorType.GetAllVendirType();
foreach (EVendorType obj in ObjVendorTypeList)
{
vendorTYpecomboBox.Items.Add(obj.VendorType);
}
}
For ListView:
private void LoadVendorTypeListView()
{
vendorTypelistView.Items.Clear();
ObjVendorTypeList = ObjBvendorType.GetAllVendirType();
foreach (EVendorType obj in ObjVendorTypeList)
{
vendorTypelistView.Items.Add(obj);
}
}
for listview you have to bind the object in list column.
<GridViewColumn DisplayMemberBinding="{Binding Path=VendorType}" Header="Vendor Type" Width="100"/>
Enjoy...
Comments
Post a Comment