Home All Groups Group Topic Archive Search About

how can I do a databind to arraylist?

Author
23 Jan 2006 8:46 AM
amos hchmon
I have a arraylist I want to bind him to datagrid how can I do this?
could I get a reference about this or example.
thanks.

Author
23 Jan 2006 8:52 AM
Ranjan Sakalley
Hello amos,

Its as simple as this -
_myGrid.DataSource = myList;


But, all the objects on the list must be coherent, meaning the same public
properties exposed, which shall be shown on the grid as columns. Basic thing
is that whatever you want to show on the grid,as columns, should be a public
property. Each object in the list becomes a row.


HTH,
r.
http://codebetter.com/blogs/ranjan.sakalley/

Show quote
> I have a arraylist I want to bind him to datagrid how can I do this?
> could I get a reference about this or example.
> thanks.

AddThis Social Bookmark Button