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
be able to hide/show/disable/enable buttons from the navirator bar
15/08/2011
18:58
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello Tony,

I read from time to time close requirements about the buttons in the navirator bar. Mostly it's the following requirements

  • to make standard navigator buttons visible or hidden dynamically (see here an example)
  • to enable/disable navigator button (like Edit/Delete) based on the current selected row (see here an example)
  • include the id of the current selected row as the additional parameter of the onClickButton callback function of the navButtonAdd.
  • include in navButtonAdd some simple tests which allow to skip adding of the button if the same button (with the same buttonicon for example) already exist. In the way 

Mostly first two requirements seems me interesting. So I suggest the following:

  1. to change the current behavior of the navGrid creation. One can create all standard buttons in the navigator bar, but hide the buttons having false setting.
  2. with respect of call navGrid at the second time one can ignore all other parameters excepting boolean parameters edit, add, del, search, refresh and view. One can use the second navGrid call to make the corresponding buttons visible or hide there. In the same way one can add new boolean "visible" property to navButtonAdd and allows multiple call navButtonAdd to change the visibility of the custom button. If the second call you don't like, one can provide another method which would allow to hide or to show the standard navigator icons.
  3. show Edit and Delete navigator buttons disabled per default and enable there if the current selected row is editable:
    Image Enlarger
  4. provide callback functions which allows to enable any button based of the selected row (like beforeSelectRow which return true or false can be used to allow to select rows).
  5. provide methods which can be used to explicitly disable/enable any button from the navigator toolbar.

It seems to me that the suggestions are very common and the changes which I suggest could be interesting to all jqGrid users

Best regards
Oleg 

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
36 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