Forum


16:34

05/08/2008

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.
15:44

Moderators
30/10/2007

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.
11:05

05/08/2008

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.
18:32

Moderators
30/10/2007

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