Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
435
Most efficient way to iterate through rows and access cells in client side script?
posted

 I've written an application where you can specify formulas to recalculate column values on the client side. I generate javascript to do this (rather than using the CalcEngine). Depending on how the app has been configured it can either recalculate the formulas on the fly as cell values are changed or the whole grid can be recalculated via a use instigated button press. However if I have a decent number of rows and colums (say 50 rows with 10 columns) it's somewhat slow. 

 Currently I use a for loop and getRow(x) where x is the row index. I also use getCellFromKey() on the row. Is there a quicker way? Would row.getNextRow() be a faster way of moving though all the rows?

 

 

Parents
No Data
Reply
  • 28464
    posted

    Hello,

    That's an interesting one. Very tough to tell, will have to ask someone from the development team. I see that in the client-side find() method there is the following way to iterate through the rows

    `        row=g.Rows.getRow(0);
            if(row && row.getHidden())
                row=row.getNextRow();

    and this makes me think getNextRow might be more efficient (or at least is for sure as fast as getRow(index) ).

    Still - no clue. If I get info from our grid dev guys I will let you know.

     

Children
No Data