Flexigrid 动态按钮
我想更换 Flexigrid 中的按钮,这是我的代码,
$('#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 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我一直在寻找完全相同的东西,但是在检查插件的源代码时没有任何反应是有道理的,因为显然没有考虑该用例。
因此,如果您不想破解该插件,您可以这样使用类名和
parent()
:其中 my_edit_button 是 中指定的值bclass参数:
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:where my_edit_button is the value specified in the bclass parameter:
这就是隐藏按钮的内容
这就是显示按钮的内容。
您可以从服务器端获取操作,匹配它们并相应地显示和隐藏。
This is what hide the button
This is what shows it.
you can fetch the operation from the server side , match them and show and hide accordingly.