how do i coonect an ilist to the datagrid. Here the code i have wrriten but u get the length of the value in the ilist insted of the actual value in the ilist.
private void Form1_Load(object sender, System.EventArgs e)
{
myilist ilist = new myilist();
ilist.Add((string) "Test");
ilist.Add((string) "Test1");
ilist.Add((string) "Test22");
this.dataGrid1.SetDataBinding(ilist,"");
}
}
class myilist:CollectionBase
{
public int Add(string value)
{
return(List.Add(value));
}
protected override void OnValidate( Object value )
{
if ( value.GetType() != Type.GetType("System.String") )
throw new ArgumentException( "value must be of type string." );
}