Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by J. van Eck on Jul 24, 2009 14:33
open dhtmlx forum
problem with smartrendering and selectRowById -> not scrolling to selected row.

Hello, we are using smartrendering and want to use selectRowById, but the grid is not jumping to that row. Even when we use mygrid.showRow(selid); the selected row is not shown.

How can we use smartrendering and selectRowById?

=====================
2nd question

for this row selection we are use the mygrid.attachEvent("onXLE",function(){
but this is triggered everytime the grid is ready, but we want to use it only the first time and not when the grid is
rebuild for rendering.

How?

thanks in advance.

Jiri
Answer posted by dhxSupport on Jul 27, 2009 01:43
To use selectRowById necessary row should be loaded from the server side. 
>> but we want to use it only the first time and not when the grid is rebuild for rendering.
You can use 2nd parameter of load() method:
mygrid.load("grid.php",function(){
//first rows portion were loaded
})

Or you can detach "onXLE" event after first occurrence:
var onXLEId=mygrid.attachEvent("onXLE",function(){
//first rows portion were loaded
mygrid.detachEvent(onXLEId);
})