Categories | Question details Back To List | ||
Disable sorting when using complex content in header. Hi, Support. I'm using complex context in header as shown in this example: http://dhtmlx.com/docs/products/dhtmlxGrid/samples/header_footer/grid_complexheader_content.html But the problem is when clicking on Header near textbox (below 'Title") in example above, the column is sorted and sorting image appears near the text box. How can I prevent it? The sorting should be enabled, but only when clicking on top part of the header. I'm using custom sorting function: mygrid.attachEvent("onBeforeSorting",customColumnSort); but I can't check where click was made: in top part of the header or bottom... Thanks a lot Shurik Answer posted by dhxSupport on Feb 19, 2009 08:30 Please check this article http://www.dhtmlx.com/docs/products/kb/index.shtml?cat=kb&q=2433&ssr=yes&s=smart%20rendering%20multiline) Answer posted by Shurik on Feb 23, 2009 01:12 Thank you for answer, but it don't solve my problem, the problem is other: I don't want to replace image or disable sorting at all for the column. The sorting should be enabled, but only when clicking on top part of the muli-row header. Answer posted by Support on Feb 23, 2009 07:10 The only way to block sorting for some row of grid - stop native onclick event on it. mygrid.hdr.rows[INDEX].onclick=function(e){ (e||event).cancelBubble=true; } where INDEX - index of row in header ( 1-based ) Answer posted by Shurik on Feb 23, 2009 07:55 Support! You are great! Exactly what I need. Thanks a lot! |