Forum

May 22nd, 2014
A A A

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

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

Topic RSS
custom buttons: how to remove them
04/12/2009
16:34
stefan.livens
Member
Forum Posts: 12
Member Since:
05/08/2008
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
tony
Sofia, Bulgaria
Moderator
Forum Posts: 7679
Member Since:
30/10/2007
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 PHP, ASP.NET and ASP.NET MVC visit us at our commercial products site - trirand.net - by the very same guys that created jqGrid.
08/12/2009
11:05
stefan.livens
Member
Forum Posts: 12
Member Since:
05/08/2008
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
tony
Sofia, Bulgaria
Moderator
Forum Posts: 7679
Member Since:
30/10/2007
Offline

Hello,

Thanks. Any usefull addition into the documentation is welcome.

Best Regards

Tony

For professional UI suites for PHP, ASP.NET and ASP.NET MVC visit us at our commercial products site - trirand.net - by the very same guys that created jqGrid.
Forum Timezone: Europe/Sofia

Most Users Ever Online: 215

Currently Online:
46 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1233

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11314

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10523

Posts: 31109

Newest Members: shrat, wheeliea, dontbannedme, duyquang, jhardt1, HamidM

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

Administrators: admin: 61

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information