如何隐藏jqGrid的列动态 [英] How to hide a jqgrid column dynamically
本文介绍了如何隐藏jqGrid的列动态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的asp.net MVC的Web应用程序中实现jqGrid的。
I am implementing jqgrid in my asp.net MVC web application.
在我的网,我有两列编辑和删除。只有当用户被记录为管理员删除应该是可见的。
In my grid i have two columns edit and delete. The delete should be visible only if the user is logged as admin .
如何才能在动态的jqGrid列hide.show。我有一个会话变量,以检查是否已登录的用户是管理员或没有。
How can we dynamically hide.show columns in jqgrid. I am having a session variable to check whether the logged in user is Admin or not.
我在访问的JavaScript变量。但是,不知道我怎么能隐藏/中的jqGrid显示列
I am accessing that variable in javascript. but, not sure how can i hide/show column in jqgrid
请帮助..
推荐答案
这一次的工作:
$("#list").hideCol("ColumnName")
这篇关于如何隐藏jqGrid的列动态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文