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

4

2 回答 2

1

我一直在寻找完全相同的东西,但是在检查插件的源代码时没有任何反应是有道理的,因为显然没有考虑该用例。

所以如果你不想破解插件,你可以使用类名parent(),这样:

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

其中my_edit_buttonbclass参数中指定的值:

{name: 'Edit', bclass: 'my_edit_button', onpress: onedit}
于 2010-10-11T13:42:24.097 回答
0
$(bclass_tag_goes_here).parent().hide();

这就是隐藏按钮的原因

$(bclass_tag_goes_here).parent().show();

这就是它的表现。

您可以从服务器端获取操作,匹配它们并相应地显示和隐藏。

于 2013-09-17T10:52:07.267 回答