SetColLable header row index not working as expected

Hi,

I have a recent problem with dynamical header captions in DHTMLX Standard Edition. According to the documentation docs.dhtmlx.com/doku.php?id=dhtm … olumnlabel it should be possible to specify the header row index to update the column caption.

Well, it is not working for anything else than the first header row. I tried both setColLabel as well as setColumnLabel but no success at all.

grid.setColLabel(column, ‘Total’, ‘#,##0’), 1); // --> c + 1 = 2 in setColumnLabel
grid.setColLabel(column, ‘Month’, ‘#,##0’), 2);

grid.setColumnLabel(column, ‘Total’, ‘#,##0’), 2);
grid.setColumnLabel(column, ‘Month’, ‘#,##0’), 3);

I have three header rows based on XML definition.

Additional info:
When I use either a provided filter like #stat_total or a self-defined like #stat_total_quotation in header row > 0 the caption is updated nicely. My problem is performance-related as it takes too much time and CPU load for a column filter to calculate the values which I could already provide before-hand.

Looking forward to your reply.

Best regards, JoKi

PS: I queried the documentation, this forum and the old knowledge base before posting.

Ouch, gotcha!

The column index needs to be adjusted!
I just found out that in combination with #rspan, the column index provided by grid.getSelectedCellIndex() has to be reduced by the number of #rspan elements individually in each header row.

My setup looks like this:
1st header row: no #rspan
2nd header row: 15 #rspan
3rd header row: 10 #rspan

Using the following code provides the expected behaviour:

grid.setColumnLabel(column-15, ‘Total’, ‘#,##0’), 2);
grid.setColumnLabel(column-10, ‘Month’, ‘#,##0’), 3);

Is there any chance to get/query the number of #rspan in a specific header row?

Regards, JoKi

Is there any chance to get/query the number of #rspan in a specific header row?
Unfortunately such feature is not available.