Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Phil on Mar 23, 2009 05:21
open dhtmlx forum
dhtmlxGrid

Hello,

How to get the row count of a grid which is populate with a connector (mysql database)?
I mean the total row count of the dataset , not only the number of rows in case of smart rendering and dynamic loading.

Thank you very much

Phil
Answer posted by Support on Mar 23, 2009 05:41
grid.getRowsNum() always return total count of rows, for dynamical loading mode it will be total count of rows in grid ( not the count of already loaded rows )
Be sure to call this command from onXLE event or through second parameter of loadXML - it need to be called only after data loaded in grid. 
Answer posted by Phil on Mar 23, 2009 10:53
This is the code, but it always return 0 value !!!
Can you tell me what 's wrong with it and give me and example.

Thanks

function mSelectDate(date) {
grille_Actualites.load("Connect_Actualites_Jour.php?Date="+ mCal.getFormatedDate("%Y-%m-%d", date),alert(grille_Actualites.getRowsNum()));
grille_Actualites.init();
grille_Messages.load("Connect_Messages_Jour.php?Date="+ mCal.getFormatedDate("%Y-%m-%d", date));
grille_Messages.init();
grille_Systemes.load("Connect_Systemes_Jour.php?Date="+ mCal.getFormatedDate("%Y-%m-%d", date));
grille_Systemes.init();
accordeon.cells("actualites").open();
}
Answer posted by dhxSupport on Mar 24, 2009 03:02

Your code should looks like that:

grille_Actualites.load("Connect_Actualites_Jour.php?Date="+ mCal.getFormatedDate("%Y-%m-%d", date), function(){

alert(grille_Actualites.getRowsNum());

});