Right click on header

Hi, just wondering if you have a right click event on a header



thanks

There is no separate event , and it not so simple to introduce new one, because most mouse event on header object already used by other grid methods, please check attached snippet it taken from oncoming version of grid, it can be used to create any custom reactions on right click in header

grid.enableHeaderMenu(); //activates all necessary event handlers
grid._doHContClick  called when right click occurs
grid._showHContext  called (with first parameter as false ) when some other click occurs outside ( so context menu need to be closed )

dhtmlxgrid_hmenu.zip (614 Bytes)

Hi Thanks but i don’t quite know how to use this. i placed this attachement into the js files and then included it within the page i used the code as you stated but it says that grid._showHContext and grid._doHContClick are not functions. how do i use them so that i can have put code inside some functions for it to do when the column headers are right clicked

thanks

This is only part of code, so it expect that you will define was methods

grid._doHContClick =function(){

    //code to fire on header right click action

}

grid._showHContext=function(){

    //code to close any custom popup menu, if necessary

}

The full code will be released as part of next version in nearest days, which will include live sample.