Hiding columns through header menu: point of no return

Hello,

we enabled the header menu on our dhtmlxGrid according to the tutorial here: dhtmlx.com/docs/products/dhtmlx … _menu.html to let the users hide and unhide all of the columns to their own will.

Problem is: the header menu is not accessible on a non column area - e.g. if no column has an automatic width and the table space is larger than all columns - the empty space (on the same level as the header) does not provide the context menu.
Even worse is the situation if you hide all columns: There is no way to show any column again (see dhtmlx example through above link).

Is there a standard way to show the table again?

Regards
mpanh

The only solution is to show the columns using the API:
myGrid.setColumnHidden(0,false);

Seriously? Come on now, your library supports the hiding of columns, so there should also always be a way to show them again built-in.
Similarly with the inability of right-clicking on empty space in the header. I don’t see a good reason why it shouldn’t be possible to right-click anywhere, as long as it’s within the header?

Please, try to add the following code to your grid initialization:

myGrid.attachEvent("onColumnHidden", function(index,state){ var vis_num=0 var colNum=myGrid.getColumnsNum(); for (i=0;i<colNum; i++){ if (!myGrid.isColumnHidden(i)) vis_num++ } if(!vis_num){ myGrid.setColumnHidden(index,false) } });

Well, this is the solution we implemented in the meantime as a workaround - but it’s still not a nice solution:
Clicking the checkbox in the context menu for the last visible column unchecks it and stays that way as long as the context menu is open - creating an inconsistent UI because the column is still visible. From the end user perspective it would be more elegant if the checkbox would not be clickable in the first place (disabled state), as long as no other columns are shown again.

Unfortunately this is the only workaround I can suggest you for now.
The problem is added to our roadmap and the solution will be added to the future versions of the dhtmlxGrid.

Thanks for the update regarding your future plans!