By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,982 Members | 1,114 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,982 IT Pros & Developers. It's quick & easy.

DataGrid binding to an arraylist of items object

P: n/a
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.

May 12 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

May 12 '06 #2

P: n/a
ma*******@gmail.com wrote:
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....idview-or.html
May 12 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.