:: pepysDHTMLX :: enableSmartRendering issue

I’ve tried to implement step-by-step the Smart Rendering in a grid using the tutorial:



dhtmlx.com/docs/products/dht … ggrid.html



Everything is ok until a moment. I’ve setted



if(isset($_GET[“posStart”]))

$posStart = $_GET[‘posStart’];

else

$posStart = 0;

if(isset($_GET[“count”]))

$count = $_GET[‘count’];

else

$count = 30;



and



    gridQString = “mygrid.php”;

    mygrid.loadXML(gridQString);





and when I use this for a table, the first 30 rows is shown great,the called XML path is:



mygrid.php



After the 30th row, my grid is blank, without any rows inside, even the called XML path is right



mygrid.php?posStart=30&count=4



So what kind of problem is this? What’s wrong?

Please check response XML generated by the script ( just load the same URL in separate window )
Be sure that it contains correct pos attribute
<rows pos=“SOME” >
For mygrid.php?posStart=30&count=4 it must conatain
<rows pos=“30”>

Without pos attribute , xml can’t be correctly mapped to the view, which will result in error similar to one in your case.

If issue still occurs for you - please provide a sample of xml generated in problematic case.

By the way, you can check
dhtmlx.com/docs/products/dhtmlxC … ndex.shtml
It is a set of classes which automates xml generation

Thanks for your answer. You can see attached my generated .XML file for mygrid.php?posStart=30&count=4. I think the sintax is correctly, what problem can I have then?

About the DHTMLx Connector, I’ve tried and I think is very cool. But I’m not sure I can use it with creating the dinamic XML sintax. Do you think can I use DHTMLx Connector with this:

$strXML .= “”;

$strXML .= “”;

    $strXML .= “”;
    $strXML .= “”;
        $strXML .= “<![CDATA[#text_filter,]]>”;
    $strXML .= “”;
    $strXML .= “”;

    $strXML .= “Nume”;
    $strXML .= “Actiuni & Links”;

$strXML .= “”;


while($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {

    $strXML .= “<row id='”.$row[‘id’].“'>”;
        $strXML .= “”.$row[‘nume’].“”;
        $strXML .= “<![CDATA[";
           
            $strXML .= "edit • ";
            $strXML .= "delete";
                                  
            eval('$strXML .= "'.$viewOptions.'";');       

           
        $strXML .= "]]>”;
       
    $strXML .= “”;
   
    }


$strXML .= “”;


grid.xml.zip (722 Bytes)

Problem caused by “head” section, each time when grid found “head” section it reset configuration to one described in XML, which switch scroll state back to the top of grid
To resolve problem , you can change your code, so section output to client only when $posStart == 0

>> But I’m not sure I can use it with creating the dinamic XML sintax.
Existing version will not allow to inject “” section, so this part can’t be done currently by connectors.
But if you mean html links inside cell - it can be done by using custom rendering function

dhtmlx.com/docs/products/kb/inde … foreRender


finally, a working answer… thanks…