addRow problem with math column type cell

Plz see my grid xml bellow:


S.#
Account

        </column> 
          <column  id="Descr" width="20"  sort="str" type="ed"  align="left"  >Description</column>
            <column  id="Qty" width="10"  sort="na" format="0,000.00" type="edn" align="right" >Quantity</column>
              <column  id="QtyBonus" width="10"  sort="na" format="0,000.00" type="edn"  align="right" >Bonus Qty</column>
              <column  id="Price" width="10"  sort="na" format="0,000.00" type="edn"  align="right" >Price</column>
              <column  id="GrossAmt" width="10"  sort="int" format="0,000.00" type="ron"   align="right" color="white" >Gross Value</column>
        <settings> 
                <colwidth>%</colwidth> 
        </settings> 
    </head> 

   
   <row id="1" >
    <userdata name="SID">111</userdata>	
    <userdata name="SubRef">kjkj</userdata>
    <cell></cell> 
        <cell>comboValue^comboText</cell> 
    
    <cell >Descr </cell> 
    <cell>999 </cell> 
    <cell >99 </cell> 
    <cell>12</cell> 
    <cell type="math">=(c3+c4)*c5</cell> 
   </row> 
Here's my grid init code: ListGrid.enableLightMouseNavigation(true); ListGrid.init(); ListGrid.setSkin("dhx_skyblue"); ListGrid.setSizes(true); ListGrid.setMathRound(2); ListGrid.load('xml file above...');

It works well when i populate the grid with default no of rows (I generate rows data in xml file via server-side programming; but when i give user the option of adding new rows on INSERT key press, the newly created row has no math formula enabled on the last cell:

ListGrid.attachEvent(“onKeyPress”, function onKeyPressed(code, ctrl, shift) {

                if (code == 45) {//INSERT
                    
                    var newId = (new Date()).valueOf();
                    var firstRowID = ListGrid.getRowId(0);
                    var SID = ListGrid.getUserData(firstRowID, "SID");
                    ListGrid.addRow(newId, "", ListGrid.getRowsNum());
                    ListGrid.selectRow(ListGrid.getRowIndex(newId), false, false, true);
                    ListGrid.setUserData(newId, "SID", SID);
                   //HOW TO TELL THE GRID THAT THE NEW ROW ADDED HERE SHOULD EXHIBIT THE SAME BEHAVIOR AS ABOVE/ALREADY LOADED ROWS? I.E. WITH LAST COLUMN OF TYPE MATH AND FORMULA: (c3+c4)*c5???

                }

In that case you should define the formula for a column.

If it’s the last column in your situation try to do it like this:

<column id="GrossAmt" width="10" sort="int" format="0,000.00" type="ron[=(c3+c4)*c5]" align="right" color="white" >Gross Value</column>