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
Show/Hide dialog displays when clicking other buttons on footer
22/10/2008
14:52
Avatar
Renso
PA
Member
Members
Forum Posts: 118
Member Since:
11/09/2008
sp_UserOfflineSmall Offline

Once again a great job with the new 3.3 features! The issue I have is that I used navButtonAdd to add my add/hide culmns button that performs setColumns on cliick. But when the user clicks any of the other buttons, like edit a row, delete a row, the modal dialog for that comes up as well as the Show/Hide dialog for selecting which columns to display/hide. It also happens if I click on for example the edit button and have no row selected, in this case both dialogs also ppear, the one for selecting columns as well as the dialog that informs the user to select a row first. I am not sure if this is a bug. Seee my code exmaples below:

setting jqGrid:

            loadComplete: function()    {
                $(item+'Pager .tbutton').click(function (){$(item).setColumns(); });       
            },
            loadBeforeSend: null,
            search: true,
            searchdata: {},
        .navGrid(item+'Pager',
            {refresh: true, edit: true, add: true, del: true, search: true},
            {}, // edit options
            {}, // add options
            {}, // del options
            {} // search options
        )
        .navButtonAdd(item+'Pager',{caption:"",title:"Select Columns",buttonimg:jQueryImagePath+'/find.gif',position:'last',onClickButton:null}
        );

22/10/2008
15:08
Avatar
Renso
PA
Member
Members
Forum Posts: 118
Member Since:
11/09/2008
sp_UserOfflineSmall Offline

Found my issue, the loadComplete function where the click event is set for the column set button is not unique:

$(item+'Pager .tbutton').click(function (){$(item).setColumns(); });    

It targets all buttons (i.e. tbutton). Simply need to use a more unique selector:

$(item+'Pager td.nav-button[title="Select Columns"] .tbutton').click(function (){$(item).setColumns(); });    

Can you add a way to add a class name (addClass) somehow to the navButtonAdd options, or is there a way for me to extend it so I can maybe added my own class name so it is easier to identify?

25/10/2008
06:15
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thank you for this - I think something similar, but your

recommendation is of course better.

(I need to identify these buttons too).

I will add a option for class for every custom button so that

we can easy identify it.

Thank you

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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