DataGrid binding to an arraylist of items object

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.
 
G

Galcho[MCSD.NET]

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
 
I

intrader

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

Top