How do I pass the Total records found to the ToolBar?

I’ve set up the ToolBar pagination with my grid and I want to show the total number of records found in a given search. I know how to add the Text element, but how do I pass along the [total] value that is available with the default paging skin?

What I have so far:

labgrid.loadXML("./connectors/label_connector3.php",function(total){ var toolbar = labgrid.aToolBar; toolbar.addText("totaltext",0,"Total number of Records Found: " + total); }); This returns at the beginning of the toolbar “Total number of Records Found: undefined”

Not exactly what I want. :frowning:

I found the answer: mygrid.getRowNum(). So, in the above code I would do:

labgrid.loadXML("./connectors/label_connector3.php",function(){ var toolbar = labgrid.aToolBar; toolbar.addText("totaltext",0,"Total number of Records Found: " + labgrid.getRowNum()); }); This works great!