Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Dynamically Disabling Buttons of JQGrid tool bar
25/07/2012
14:12
Avatar
ravindrasingh2411@gmail.com
New Member
Members
Forum Posts: 1
Member Since:
25/07/2012
sp_UserOfflineSmall Offline

Hi all,

I have a requirement ,according to which i have to dynamically enable or disable the Add, Edit and Delete button on jqgrid.

So if the user have some administrator priviledges ,then the button should be enabled else disabled.

I tried searching for it , but couldn't find a solution.

Please Suggest !!!

Thanks in Advance,

Ravindra Singh

25/07/2012
16:41
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Please look at documentation 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.

12/11/2014
15:27
Avatar
Vignesh
Member
Members
Forum Posts: 3
Member Since:
12/11/2014
sp_UserOfflineSmall Offline

tony said
Hello,

Please look at documentation here

Regards

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? 

12/11/2014
16:57
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hi Vignesh,

look at the answer and this one in which included the corresponding demos. The idea is very easy: one can create all buttons and hide currently unneeded buttons. Later one can make some buttons visible depend on which row is selected. Alternatively on can disable/enable buttons instead of showing/hiding.

Best regards
Oleg

13/11/2014
09:44
Avatar
Vignesh
Member
Members
Forum Posts: 3
Member Since:
12/11/2014
sp_UserOfflineSmall Offline

Hi Tony/OlegK,

    In page load I can enable/disable. But after the page is loaded can I change the visibility of edit icon by the event of a button click. 
the code i used inside button click event, $("#grid").jqGrid.navGrid('#pager', { edit: false });

Is this possible. Or is there any other way to change the visibility after the page load(at the page load Edit:true, after any event i must change edit:false). Can you please reply on this.

 

regards,

Vignesh 

13/11/2014
09:59
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Sorry, but it seems to me that you didn't read the referenced answer. I repeat: I suggest to create navGrid with all buttons which you could need make visible later. Then you hide unneeded buttons directly after creating and show it later when the button will be needed. The demo from the answer demonstrates how buttons from navGrid can be shown or hidden. 

Regards
Oleg

19/11/2014
16:03
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello Oleg,

 

Thanks for sharing this.

 

Kind 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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
74 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information