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
custom buttons: how to remove them
04/12/2009
16:34
Avatar
stefan.livens
Member
Members
Forum Posts: 12
Member Since:
05/08/2008
sp_UserOfflineSmall Offline

Hi,

First, thank you for this wonderfull component.

Now I have a question: How do I remove custom buttons from the navigator (the pager)?

I add them like this:

$("#org_tree").jqGrid({
    ...
})
.jqGrid("navGrid","#tree_pager",{edit:false,add:false,del:false,search:false,refresh:false})
.jqGrid("navButtonAdd","#tree_pager",{
        onClickButton:switchTree,caption:"Show Full Tree"
    }
);

Now this is my function switchTree:

function switchTree(){
    $("#org_tree")
        .setGridParam({url:"../dev/org1.json",page:1})
        .trigger("reloadGrid")
        .jqGrid("navButtonAdd","#tree_pager",{
                onClickButton:switchTree2,caption:"Show My Tree"
            });
}

This function adds the button, so I have 2 buttons , now how can I replace the button "show full tree" with the button "show my tree"?

thanks in advance.

05/12/2009
15:44
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

When created this way every button has a uniquie id (or you can give them one).

If know this Id it is easy to manipulate.

http://www.trirand.com/jqgridw.....om_buttons

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.

08/12/2009
11:05
Avatar
stefan.livens
Member
Members
Forum Posts: 12
Member Since:
05/08/2008
sp_UserOfflineSmall Offline

Thanks Tony.

I must admit, I overlooked this optional id you can set when creating these buttons.

(just for future reference, like this:

.jqGrid("navButtonAdd","#tree_pager",{
                onClickButton:switchTree,caption:"Show Full Tree" ,id:"tree_button"
            });

Maybe we can add it in the "discussion" section of that wiki page?

Thanks again.

08/12/2009
18:32
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thanks. Any usefull addition into the documentation is welcome.

Best 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:
52 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