how to know record number after fetching data from backend d

I get data from backend database by xml stream, howerver, how to get record number on web page?

thank you very much!

You can get number as

    alert(grid.getRowsNum()+" rows loaded");

invoke getRowsNum(), but can’t get number,why?

i immediately invoke getRowsNum() after load data method, result is 0, how to figure it out?thank you

The loading of data is async. You need to use onXLE event or second parameter of loadXML command to catch moment when data loaded