3.2.0

table response and functions

I have a table that loads:
table.request();

Once the table data loads (before the grid is displayed), I need to do some calulations and display some information on the page. So, I thought I'd try something like this:
table.request(); <!-- reads the data file into the table -->
  table.response = function(doc) { 
    document.all.totalMem.value = "Total Members = " + obj.getRowCount();
     }


The problem is, it still comes back as "0".

Now, if I put the above code in the grid definition, in something like the footer piece, it works. But the problem is, every time the grid changes, the footer will change (and the grid changes in row count because I allow for filtering - so the obj.getRowCount() will adjust - which I don't want.

So, my question is, once a table has the data, and before it gets displayed as part of the grid, how to I get the number of rows loaded and how do read this data (so I can find elements that make up the "Total Members"? I realize I'll have to create a function to do the math, I just can't figure out how to get to the information that is loaded before it makes it to the grid (and again, since the grid has data changes, I can't do it in the footer).

Is there a way to run an event once and only once when the grid is populated? That would work too.

Carl
August 24,

This topic is archived.

See also:


Back to support forum