I have a dhtmlXGrid control that I want to switch between different sets of data using a dhmtlXCombo control in the header of the grid control. The problem is that I need to change the header with the different selections in the combo and I’m getting script errors.
In the header for the grid, I define some text and a div tag to hold the combo. This works when the page is first displayed:
theGrid.setHeader(" Text that changes with selection
theGridCombo = new dhtmlXCombo(“grid_combo”,“selectType”,160,“image”);
I see the combo control in the header for the grid control and the values I expect to see are in the list.
I attach a function to the onChange event for the combo control. When the selection changes I need to change the text in the header of the grid control as well as the data in the grid. So far I haven’t been able to do so.
I use the clearAll function followed by a call to the constructor for the combo control on the grid but I can’t change the header text with the div tag in it sucessfully. I get an “Object Required” error in dhmtlxcombo.js when the parent object is accessed in the constructor as if the div tag wasn’t found.