Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Torridon on Mar 11, 2008 13:25
open dhtmlx forum
math formulas in cells

Hello,

I have a question regarding use of math formulas in cells. I looked at the example offered in the documentation

setColTypes("ed,ed,ed,ed,ed[=c2*c3]");

I was wondering if it's possible to change math formulas to cover cells in different rows (for example c2 in the previous row), similar to MS excel.

Thanks
Answer posted by Support on Mar 12, 2008 08:15
You can set math formulas directly in the cell tag:

For example:

<row id = "2">
    <cell>2</cell>
    <cell>3</cell>
    ...
</row>
<row id = "3">
    ...
    <cell>=[[2,0]]*[[2,1]]</cell>
</row>

In this case the value of the cell in the 3rd row will be 6.


Answer posted on Mar 12, 2008 11:27
Thanks for the reply. I know about formulas in XML where I can use [row,col] but I was wondering if the same thing is possible with setColTypes where I could use something like ed[=cj*c3] where cj is a cell in a previous row.
Answer posted by Support on Mar 13, 2008 02:06
There is no way to include "previous" row in formula, you can define the absolute positioned cell ( =[[1,0]]*c3 ). But there is no way to use relative links in math formulas.