Skip to Content
avatar image
Former Member

How to get values from table without clicking on the row?

Hi All,

I have to retrieve (array of values) values from table and use it for calculating purpose.

my view code:

<Table id="idcompallowancetable"

items="{/Added_AllowancesSet}" >

<columns id="idtablecomp">

<Column demandPopin="true">

<Label text="Allowances" design="Bold" />

</Column> <Column demandPopin="true">

<Label text="Amount" design="Bold"/>






<Text text="{Subtype_Text}"/>

<Text text="{Betrg}"/>





"Betrg" - This is amount field.Totally 6 amounts will come.

I want to get those values and add up.

Please suggest me.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 23, 2017 at 01:58 PM

    you can get data from model itself if you are binding from model.

    or, check below if it helps,

    var oTableItems = oTable.getItems();
    var totalAmt = 0;
    for (var i = 0; i < oTableItems.length; i++) {
    var rowAmount = this._oDataModel.getData(oTableItems[i].getBindingContext().getPath() + "/Betrg");
    totalAmt = totalAmt + rowAmount; 
    Add comment
    10|10000 characters needed characters exceeded