Hi
I have a solution that is pretty generic and allows you to add any set
of buttons and seperators as you please.
It's configured through the grid tag.
example:
navigatorButton="true"
navigatorButtonCount="3"
navigatorButtonOptions="{fn_0:'seperator', fn_1:'callMe',
title_1:'Some Button', fn_2:'seperator'}"
Here it tells it to create 3 buttons, in this case is 2 seperators one
in front the other at the end.
the options it takes have to end in a number 0,1,2... and so forth and
correspond to the button count.
there might be a better way to do this but this is easy and fast.
the properties are
(where x is the number for the button)
fn_x - mandatory ( function name to call onClick event - if fn_x =
'seperator' a seperator is added instead of a button )
caption_x - optional - caption for the button ( default = '' )
icon_x - optional - icon to use for the button ( default = 'ui-icon-
newwin' )
title_x - option - title for the button ( default = '' )
in javascript you would have a function like bellow
callMe = function(elem) {
alert('got object: ' + elem);
};
elem is the $elem from used by the plugin so you can do
$elem.jqGrid....
or do whatever you like or ignore if you want.
Does this solution sound good or is there something else that you
would like on it?
Thanks
Yael