Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by withzestmn on Mar 29, 2009 01:16
open dhtmlx forum
block default sorting

Hi,
I want to block default sorting on the header.
And, I want the sorting function to work when my image is clicked on cells of header.

So, I insert the followings code.
mygrid.attachEvent("onBeforeSorting",function(ind,type,direction){
return false; //block default sorting
});

This works well.But, the other click event(e.g.) setColumnHidden(false..)) doesn't work on the cell.

Help me,please...
Answer posted by dhxSupport on Mar 30, 2009 06:06

If needn't sorting behaviour on this column better to deny it via method mygrid.setColSorting("na");

If you have attached image in the header and and want to stay sortin behaviour on this column you can cancellBubble for "onclick" event for the header's row with image:

mygrid.hdr.rows[index].onclick=function(e){ (e||event).cancelBubble=true; }