Datatable sorting

I have created a datatable with two headers in each column (an array in the datatable.config.columns.header collection). Clicking on one of the headers should trigger the user sort (the standard behaviour, set in datatable.config.columns.sort) but clicking the other header should NOT trigger user sort as it is reserved for a different user interaction. I tried using the onBeforeSort event but it doesn’t expose which header triggered the event. Can you suggest how to best do this?

You can try to use onHeaderClick event.

dt.attachEvent("onHeaderClick", function(id, node, ev){
   var pos = this.locate(ev);
   if (pos.rind == 1) return false;
})

Thanks Maksim. For some reason, this.locate(ev) always returns rind=0 for both headers, but I managed to use another property of ‘ev’ to selectively cancel the sorting, so it works now. Thank you

(I meant rind ==0)