Reading the values from objects

Hi can anyone point me to some documentation or example on how I could read the value of an object. Specifically, how can I read the values of a data grid to do some simple calculations and then write back the results to the database. I allow to modify the numeric values using a Numeric Component and the booleans using a checkbox and I would like to write back the records.
I am sure I am not the first one to ask, but can not find a similar question!

You can read a record from a table by invoking the the getXXXById data source method e.g. getCustomerById. The ${result} contains all columns of the record e.g. ${result.FirstName}. You can update a database record by invoking the updateXXX data source method e.g. updateCustomer.

Thanks for the reply, I did not express myself clearly. I want to read not from the table but from the data grid after user has finished playing with the controls. Essentially allowing for some interactivity with the data grid.

At the moment you can use the Template property of a DataGrid column to add components there.

Understood, that would work well if the calculations are on a row-level. How about being able to load the values on the data grid on an array to process them?
I think I just actually need to get the data property of the grid.