doesn't implement that IList interface
A Example:
public class AddressList{
protected string strName;
protected string strPhone;
protected string strAddress;
AddressList()
{
}
public string HeaderName
{ get
{return strName;}
set
{strName = value;}
//other properties
}}
in the Class of Form Create ArrayList and DataGrid as follows-
private ArrayList AdrsList = new ArrayList(15);
private AddressList address; //this address will be stored
now let us add some data in the ArrayList and show that in the
DataGrid as follows -
address = new AddressList();
address.HeaderName = txtName.Text;
address.Phone = phoneBox.Text;
address.Address = addressBox.Text;
AdrsList.Add(address);
dataGridAdrsBook.DataSource = null;
dataGridAdrsBook.Refresh();
// Set the DataGrid DataSource to our ArrayList
// then refresh it
dataGridAdrsBook.DataSource = AdrsList;
dGridAdrsBook.Refresh();