To know the row index in a header with multiple rows

Initially, I start off with a single row in the header. The column move option is enabled and the columns are moved around. Based of some grouping conditions the moved columns are grouped. When they are grouped multiple rows in the header get created. The common properties of the grouping columns are placed in the upper rows of the header. I am using the event “onAfterCMove” to move the columns which gives me the column numbers during the movement. To get the row numbers the below code snippet is being used.

mygrid.attachEvent(“onHeaderClick”,function(index, e){
var el = this.getFirstParentOfType(e.srcElement||e.target, “TR”);
row_index = el.rowIndex;
console.log("row index in click = " + row_index);
});

The problem is that one has to click on the column header to get the row number associated to it. Is there an alternative to get the row value in a multiple row header than clicking on it?

So, you need to get the row index from which column moving was started, right ?

As far as I can see, there is no wya to get such info through public API
You can try to modify dhtmlxgrid_mcol.js, and add a custom event to the _startColumnMove function

currently it looks like

dhtmlXGridObject.prototype._startColumnMove = function(e){ ... el = grid.getFirstParentOfType(el,"TD")

Can be modified like

dhtmlXGridObject.prototype._startColumnMove = function(e){ ... el = grid.getFirstParentOfType(el,"TD") grid.callEvent("onBeforeColumnMoveStart", [el])

New event will have a source cell of header ( html element ) as parameter, el.parentNode.rowIndex must show the index of header row.