D
David Flajole
Hello,
When I create an ArrayList as follows,
private DataGrid dgLotList;
private ArrayList bidColxn;
bidColxn = new ArrayList();
I have no problem using it like so:
dgLotList.DataSource = null;
dgLotList.Refresh();
dgLotList.DataSource = bidColxn;
dgLotList.Refresh();
However, when I create a BidCollection class to wrap the ArrayList (so I can
add my own conditions for adding, removing and such),
public class BidCollection
{
private ArrayList bids;
bids = new ArrayList();
}
And, try to use it as I did above:
private DataGrid dgLotList;
private BidCollection bidColxn;
bidColxn = new ArrayList();
dgLotList.DataSource = null;
dgLotList.Refresh();
dgLotList.DataSource = bidColxn;
dgLotList.Refresh();
I get the following error:
Complex DataBinding accepts as a data source either an IList or an
IListSource
........ So, why does complex DataBinding accept an ArrayList, but not after
I wrap it in another class?
* I tried to declare the class as > public class BidCollection
:IList
This got rid of the error, but now the grid doesn't list the bids
(even though I verified that they are in the BidCollection).
Thanks, dave
When I create an ArrayList as follows,
private DataGrid dgLotList;
private ArrayList bidColxn;
bidColxn = new ArrayList();
I have no problem using it like so:
dgLotList.DataSource = null;
dgLotList.Refresh();
dgLotList.DataSource = bidColxn;
dgLotList.Refresh();
However, when I create a BidCollection class to wrap the ArrayList (so I can
add my own conditions for adding, removing and such),
public class BidCollection
{
private ArrayList bids;
bids = new ArrayList();
}
And, try to use it as I did above:
private DataGrid dgLotList;
private BidCollection bidColxn;
bidColxn = new ArrayList();
dgLotList.DataSource = null;
dgLotList.Refresh();
dgLotList.DataSource = bidColxn;
dgLotList.Refresh();
I get the following error:
Complex DataBinding accepts as a data source either an IList or an
IListSource
........ So, why does complex DataBinding accept an ArrayList, but not after
I wrap it in another class?
* I tried to declare the class as > public class BidCollection
:IList
This got rid of the error, but now the grid doesn't list the bids
(even though I verified that they are in the BidCollection).
Thanks, dave