# Reading the values from objects

**URL:** <https://forum.radzen.com/t/reading-the-values-from-objects/1009>\
**Category:** Uncategorized\
**Created:** [March 20, 2019, 11:06am UTC](https://forum.radzen.com/t/reading-the-values-from-objects/1009 "2019-03-20T11:06:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![luissisamon](https://forum.radzen.com/user_avatar/forum.radzen.com/luissisamon/32/1115_2.png) [@luissisamon](https://forum.radzen.com/u/luissisamon)\
**Post date:** [March 20, 2019, 11:06am UTC](https://forum.radzen.com/t/reading-the-values-from-objects/1009/1 "2019-03-20T11:06:18Z")

</div>

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!  
Thanks

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [March 20, 2019, 11:21am UTC](https://forum.radzen.com/t/reading-the-values-from-objects/1009/2 "2019-03-20T11:21:17Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![luissisamon](https://forum.radzen.com/user_avatar/forum.radzen.com/luissisamon/32/1115_2.png) [@luissisamon](https://forum.radzen.com/u/luissisamon)\
**Post date:** [March 20, 2019, 11:23am UTC](https://forum.radzen.com/t/reading-the-values-from-objects/1009/3 "2019-03-20T11:23:14Z")

</div>

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.  
Thanks

---

<div class="post-metadata">

**Author:** ![korchev](https://forum.radzen.com/user_avatar/forum.radzen.com/korchev/32/4_2.png) [@korchev](https://forum.radzen.com/u/korchev)\
**Post date:** [March 20, 2019, 11:26am UTC](https://forum.radzen.com/t/reading-the-values-from-objects/1009/4 "2019-03-20T11:26:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![luissisamon](https://forum.radzen.com/user_avatar/forum.radzen.com/luissisamon/32/1115_2.png) [@luissisamon](https://forum.radzen.com/u/luissisamon)\
**Post date:** [March 20, 2019, 3:52pm UTC](https://forum.radzen.com/t/reading-the-values-from-objects/1009/5 "2019-03-20T15:52:27Z")

</div>

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.  
Thanks

---

<div class="post-metadata">

**Author:** ![Neverletitdown](https://forum.radzen.com/user_avatar/forum.radzen.com/neverletitdown/32/19962_2.png) [@Neverletitdown](https://forum.radzen.com/u/Neverletitdown)\
**Post date:** [November 12, 2024, 10:00pm UTC](https://forum.radzen.com/t/reading-the-values-from-objects/1009/6 "2024-11-12T22:00:36Z")

</div>

were you able to resolve this issue. I have similar issue, where I want to add a validation on a field whether its edited or not and insert entire grid to another table. Any idea how to do that?
