I would to populate a country combo box using a collection. The code for the collection is below:
using
System;using
System.Collections.Generic;using
System.Linq;using
System.Text;namespace
BUI{
public class CountryCollection : BUIBaseCollection<Country>{
public static CountryCollection FetchList(){
CountryCollection obj = new CountryCollection();obj.MapObjects(
new DAL.Country().FetchList()); return obj;}
}
}
Fetchlist is a stored procedure that returns all records in a table. My problem is to populate my combo box I am using this code:
this
.cmbCountry.ItemsSource = BUI.CountryCollection.FetchList();and instead of displaying the items in the table, it is displaying:
BUI.Country
BUI.Country
BUI.Country
Thanks
TC
Guest UserPosted Aug 14, 2008, 2:39 PM
Try that & post here again if you need more help.