Skip to main content
GameDev.net gamedev.net
🔒 Locked

[C#]Datagridview to arraylist

Started by ronin114 Feb 22, 2008 at 6:23 PM 0 replies 3.1k views
Original Post
ronin114
ronin114
ok i got datagrid vire and a arraylist but i need to looping through datagridview and export each row to the arraylist how would i go of doing this.
gan
gan
Should roughly like:
ArrayList myAL = new ArrayList();foreach(DataRow dr in DS.Tables["your table name"].Rows){ myAL.Add( dr["your column name"]); }

where
DS = datagrid.DataSource;

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.