:: pepysDHTMLX :: enableSmartRendering issue #2

The next issues from the post dhtmlx.com/docs/products/kb/inde … ent&q=9440

My SmartRendering is working now, but I have also some others problems., even I’ve followed the all instructions.


1. When I press click for more time on the first collumn header, in order to sort the rows, it’s calling just this path

mygrid.php?tname=producatori&m=14&orderby=0&direct=asc

not

mygrid.php?tname=producatori&m=14&orderby=0&direct=desc

also. Why? What’s wrong?


2. Can I use the instant search now with SmartRendering?

3. With every click on the rows header, in order to sort the collumns, the grid div lose width, after 20 clicks the div is 590px, not 600px as it has from begining.

  1. How can I use Smart Rendering with enablePaging ? I want to have pages, not from XML, but directly loaded from server, each page in time.

>>order to sort the rows, it’s calling just this path
Please try to change your code as
function sortGridOnServer(ind,gridObj,direct){
mygrid.clearAll();
mygrid.loadXML(gridQString+(gridQString.indexOf("?")>=0?"&":"?")+“orderby=”+ind+"&direct="+direct,function(){
mygrid.setSortImgState(true,ind,direct);
});
return false;
}


>>Can I use the instant search now with SmartRendering?

Client side search|filter functionality will work only if you have all data loaded on client side , it will not work for dyn. loading mode, when only part of data available on client.

>>3. With every click on the rows header, in order to sort the collumns, the grid div lose width
Are you using one of predefined skins, or some custom one? Problem can be caused by default css customization.
If issue still occurs - please provide a snippet of HTML code, which you are using as container for the grid

>>4. How can I use Smart Rendering with enablePaging ?
Just change enableSmartRendering to enablePaging - both modes can work in dyn. mode with the same backend code. ( paging will work the same as srnd, requesting additional rows from server, when already loaded ones are not enough to render current page )
No any other settings|commands necessary.

1. Thanks, is working now, but I have here now a new problem. After I click sort on a collumn, the new rows from new pages or from SmartRendering using scrol isn’t visible any more, there’s a blank space, without any rows info.

3. I resolve this, it’s ok now.

4. This is working also, thanks

Please, give me an answer for no 1.

The new data loaded from server side will fully replace existing dataset, please be sure that new xml, loaded after sorting, has total_count attribute with valid value.
Also, if XML, which loaded after sorting , contains head section - it will cause grid reset and grid will lost auto-loading flag, which can be restored as

function sortGridOnServer(ind,gridObj,direct){
mygrid.clearAll();
var path = gridQString+(gridQString.indexOf("?")>=0?"&":"?")+“orderby=”+ind+"&direct="+direct;
mygrid.loadXML(path,function(){
mygrid.setSortImgState(true,ind,direct);
mygrid.xmlFileUrl=path;
});
return false;
}

it’s working, thank you