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…


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; }