Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Christian Rokitta on Apr 09, 2009 07:21
open dhtmlx forum
setting mouse cursor in onBeforeSorting event handler

Hi,

I'm trying to change the mouse cursor during sorting (for large datasets) in the grid:

//set onBeforeSorting event handler
mygrid.attachEvent("onBeforeSorting",function(index,grid,dir){
// Set cursor to hourglass
document.getElementById("gridbox").style.cursor = "wait";
document.body.style.cursor = "wait";
return true;
});

//set onAfterSorting event handler
mygrid.attachEvent("onAfterSorting",function(){
// Reset cursor
document.getElementById("gridbox").style.cursor = "default";
document.body.style.cursor = "default";
});

Same code used in the onLoadingStart/End event works fine.

Any idea?

regards,
Christian
Answer posted by dhxSupport on Apr 09, 2009 07:33
Grid sorting works in synchronous mode. Browser will not change anything on the page till end of sorting.
Answer posted by Christian Rokitta on Apr 09, 2009 07:39
Is there any workaround?
Answer posted by dhxSupport on Apr 09, 2009 07:54
Unfortunately there is no way to set style of the cursor while sorting.