PDA

View Full Version : getTopToolbar returning undefined



MarkF
12 Nov 2009, 4:55 AM
I'm using your grid control that is provided by ColdFusion. Although I've been able to extend it significantly using your API, I'm having problems trying to add items to the top toolbar. Here is my code:


var tbar = grid.getBottomToolbar();
var topBar = grid.getTopToolbar();


tbar is fine, but topBar is "undefined".


I'm guessing that in the 3.0 grid, there is no topToolBar defined. If that is the case, do I need to create one and add it to the grid?


Mark <><

Animal
12 Nov 2009, 5:13 AM
Obviously.

If you don't specify a tbar in the configuration, then it won't create one at render time for you to access and manipulate after the Panel has been rendered.

MarkF
12 Nov 2009, 5:22 AM
The problem is that ColdFusion builds the grid on my behalf. I don't believe I can intercept the configuration. If I can add buttons and textboxes to the bottom toolbar, is there a way to add a toolbar at the same time?