Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Saurabh Malviya on Jun 15, 2009 08:00
open dhtmlx forum
Context Menu for Grid Header

Hi,
a) How to attach context menu for column Header in a grid?
b) And to show different context menu for different column headers I need
event handler that gives me column Id under which that particular header lies.

Provide the event which can give me the Column Id.
If any sample formation can be given it will be good.

Thanks
Answer posted by dhxSupport on Jun 15, 2009 09:04
a) Header context menu could be attached only to the whole grid's header
b) Unfortunatelty current version of header menu doesn't support such functionality

You can use "onHeaderClick" event. This event occurs right after a header was clicked, before sorting or any other actions. onHeaderClick event passes the following parameters: 
ind - index of the column;
obj - related javascript event object.
  grid.attachEvent("onHeaderClick", function(ind,obj){});