Ajax DataGrid Support Product Page

record/row count

Asked 18 Feb 2010 20:39:45
1
has this question
18 Feb 2010 20:39:45 phil osullivan posted:
how can i retrieve the returned record count or row count from a filter grid function, i believe it has something to do with the {total}

Replies

Replied 22 Feb 2010 11:54:06
22 Feb 2010 11:54:06 Miroslav Zografski replied:
Hello Phil,

You want them to be passed to a script or displayed on the page?

Regards,
Replied 24 Feb 2010 14:20:58
24 Feb 2010 14:20:58 phil osullivan replied:
passed to a script, please.
Replied 26 Feb 2010 11:54:32
26 Feb 2010 11:54:32 Miroslav Zografski replied:
Hello Phil,

Here is a way to alert the number of rows. You can substitute alert in order to get the number in a function.
Just be sure to substitute dmx_grid2 with the id of your grid.
document.getElementById('dmx_grid2').grid.addEventListener(
 'contentReloaded', 
 function(e) {
  alert ("Total rows: " + this.data.total);
 }
);


Regards,

Reply to this topic