DataGrid binding to an arraylist of items object

  • Thread starter Thread starter maflatoun
  • Start date Start date
M

maflatoun

Hi,

I'm wondering if there is a way to bind to datagrid or a gridview the
items in an arraylist. These items all have vars such as price,
qty..etc? (besides putting in a datagrid or datatable first).

ex.
ArrayList alShoppingCart = shoppingCart.GetCurrentItems;
alShoppingCart contains an array list of Item objects.

Thanks
Maz.
 
it is possible
just play with it and you will find out what you need

post again if have some specific questions or troubles

Galin Iliev[MCSD.NET]
www.galcho.com
 
Hi,

I'm wondering if there is a way to bind to datagrid or a gridview the
items in an arraylist. These items all have vars such as price,
qty..etc? (besides putting in a datagrid or datatable first).

ex.
ArrayList alShoppingCart = shoppingCart.GetCurrentItems;
alShoppingCart contains an array list of Item objects.

Thanks
Maz.
You can bind a datagrid of gridview to any collection. You then set the
DataSource attribute of the datacrdi or gridview to the arraylist.
Look at this very good example:
http://webthingsconsidered.blogspot.com/2005/09/dropdownlist-inside-gridview-or.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top