Datagrid to arraylist
-
There are plenty of articles on how to bind an arraylist to a datagrid, but how exactly does one get the arraylist back out of the datagrid? I have bound an arraylist to the datagrid, and allow users to change all values (decimal, string, checkbox) and would like to update my arraylist to match the changes. I guess there are two approaches, interate through each row of the datagrid, create a new object for my arraylist, and add it to a new arraylist... Or I could just go trhough and compare the objects in arraylist and that of the datagrid and update whatever has changed... Can anyone point me in the right direction as to how to approach this?
-
There are plenty of articles on how to bind an arraylist to a datagrid, but how exactly does one get the arraylist back out of the datagrid? I have bound an arraylist to the datagrid, and allow users to change all values (decimal, string, checkbox) and would like to update my arraylist to match the changes. I guess there are two approaches, interate through each row of the datagrid, create a new object for my arraylist, and add it to a new arraylist... Or I could just go trhough and compare the objects in arraylist and that of the datagrid and update whatever has changed... Can anyone point me in the right direction as to how to approach this?