Dynamic Loading Question

In your documentation ([url]Start DHTMLX Docs) its states that “Dynamic loading can be organized wiht XML and JSON datasources only” and that “The inital response from server must contain top level “total_count” parameter, which will contain info about expected count of items in the dataview”

However, when i look at your example in the sample file ([url]http://www.dhtmlx.com/docs/products/dhtmlxDataView/samples/01_initialization/01_dynamic_loading.html[/url]) , i do not see any indication of XML or JSON datastore.

The data.php file contains:

[code]<?php
require_once(“…/…/…/codebase/connector/dataview_connector.php”);
require_once(“…/…/common/config.php”);

$conn = mysql_connect($mysql_host,$mysql_user,$mysql_pasw);
mysql_select_db($mysql_db);

$data = new DataViewConnector($conn);
$data->dynamic_loading(50);
$data->render_table("packages_plain","Id","Package,Version,Maintainer");

?>[/code]

Furthermore, there is no “total_count” parameter being passed either.
Can you please clarify the discrepancy between the Documentation and the Sample!

Also, in my case, the dynamic loading seems to work great when i have a simple case

$data->render_sql("Select * from $table1 ORDER BY records ASC","id","records");

However, when i try to collect information from multiple tables, the dynamic loading does not seem to work well. Seems like ALL the data is loaded at once :frowning:

$data->render_sql("Select * from $table1,$table2 WHERE ($table1.id = $table2.yid) ORDER BY records ASC","id","records");

Any help will be very appreciated.

i do not see any indication of XML or JSON datastore.

There is php Connector in data.php which is used to generate xml:
dhtmlx.com/docs/products/dht … ndex.shtml

Please try to open this pho script in browser to see its xml output:

dhtmlx.com/docs/products/dht … p/data.php

Thanks for the clarification!!

Also, in my case, the dynamic loading seems to work great when i have a simple case

$data->render_sql("Select * from $table1 ORDER BY records ASC","id","records");

However, when i try to collect information from multiple tables, the dynamic loading does not seem to work well. Seems like ALL the data is loaded at once

$data->render_sql("Select * from $table1,$table2 WHERE ($table1.id = $table2.yid) ORDER BY records ASC","id","records");

Any help will be very appreciated.
PS: I can create a demo and send a link if required.

Make sure that you enabled dynamic loading for the second case (dynamic_loading method).
Also I have attached the libraries for Dataview. There was a bug in dynamic loading which is fixed in these libraries.
libs.zip (50.7 KB)