Forum
10:34
20/03/2009
Hi,
Just looking through the documentation and I can't seem to find a property that allows a custom button to be set to disabled.
Ie The button is there but does not do anything for certain users, but is active for others.
I've created a work around by outputing the entire generation of the button code with PEAR in the case of users that have access. Users that don't have access don't even see the button.
What I would prefer to do is have option ie enabled:true/false and set dynamically based on user permissions.
Does this functionality exist ?
Nathan
11:14
Moderators
30/10/2007
Hello,
Currently no, but it is easy to add this
Suppose the variable edit_right holds the edit rights for the user.
Set it during the opening the page and then
...navGrid("mypager",add_right, edit_right.....)
This way the buttons will be created according to the rights.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
21:14
20/03/2009
Hi Tony,
I can see how this could apply to an existing button but how do apply it to a custom button ? I could certainly return a variable, edit_right which is valued as follows
edit_right = "edit:true" or "edit:false"
But how about for a custom button ? That's the portion I am not understanding.
Nathan
02:37
Moderators
30/10/2007
Hello,
Not quite gffrent
if(edit_right==true) {
$("#mygrid").navButtonAdd(....)
}
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
03:37
11/05/2009
tony said:
Hello,
Currently no, but it is easy to add this
Suppose the variable edit_right holds the edit rights for the user.
Set it during the opening the page and then
…navGrid(”mypager”,add_right, edit_right…..)
This way the buttons will be created according to the rights.
Regards
Tony
I would like enable/disable the "Add"/"Edit"/"Delete" button on subsequent grid reloads. How to enable/disable them?
-Praveen
15:06
Moderators
30/10/2007
Hello,
Which version do you refer? Also in 3.5 there is parameter id - where you can add this for the nav button, so you can easy enable and disable. Not available in 3.4.x versions.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
02:55
Moderators
30/10/2007
Hello,
Currently no, but if you know the id of the button you can easyshow abnd hide them
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
15:28
12/11/2014
tony said
Hello,Currently no, but if you know the id of the button you can easyshow abnd hide them
Regards
Tony
Hi Tony,Â
  I have a requirement like, need to enable and disable the Add, Edit, Delete icons in NavGrid dynamically. I can only set the values while loading, and even if i change the value of edit:false in a button click event its not working. Is there any other way?Â
16:07
Moderators
30/10/2007
Hello,
Â
The buttons have id. You can either show/hide them by condition or add to them a class ui-state-disabled, which disabled the action too. See the Oleg's post here
Â
Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
69 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66