I am new to YUI and I am using YUI 2 Datatable, I would like to alert if the total number of record is more than 4000 and not to render the table.
below is my piece of code.
this.myDataSource = new YAHOO.util.DataSource("<?php echo $html->url('/parser/dynload').'?params_array_serialized='.$params_array_serialized; ?>");
this.myDataTable = new YAHOO.widget.DataTable("gridbox", myColumnDefs,this.myDataSource, myConfigs);
I dont know how to get total number of record. Any one can help in this.
If I remember correctly,
this.myDataTablewould have agetRecordSet()method which returns aRecordSetobject which is a where the DataTable stores its data. TheRecordSethas alength(or perhaps it wascount?) property or was itgetLength()method. Anyway, regardless of the names which I cannot quite remember but the debugger will tell you, theRecordSetobject is the key to it.I do remember that the last build of the API docs for YUI went wrong and I believe the
RecordSetobject got accidentally dropped or misplaced so you won't find it there.