views:

285

answers:

1

I want to swap out buttons in my flexigrid here is my code

$('#flex').flexOptions({
  buttons : [
   {name: 'Show Tagged', bclass: 'show tagged', onpress : control_buttons},
   {separator: true},
   {separator: true},
   {name: 'All Tagged', bclass: 'show tagged', onpress : control_buttons},
   {name: 'Single tagged', bclass: 'show tagged', onpress : control_buttons},
   {separator: true}
   ]}).flexReload();

I thought this would do the trick but it's not working any idea what I might be doing wrong

thanks Mike

A: 

I was looking exactly for the same thing, however it makes sense that nothing happens when checking out the source of the plugin because that usage case was apparently not considered.

So if you don't want to hack the plugin, you can use the class name and parent() that way:

$('.my_edit_button').parent().parent().hide();

where my_edit_button is the value specified in the bclass parameter:

{name: 'Edit', bclass: 'my_edit_button', onpress: onedit}
wildpeaks
wouldn't that just simply hide and existing button and not change anything ?
mcgrailm
Yes, that was just a starting point on how to be able to modify a specific button.
wildpeaks