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
No buttons on toolbar as per demo example!
04/03/2009
12:37
Avatar
jobin2009
New Member
Members
Forum Posts: 1
Member Since:
04/03/2009
sp_UserOfflineSmall Offline

I am very new to jqGrid.  I have managed to get a jqGrid working on my localhost as per demos and examples. BUT... I have not been able to get the refresh, search or any of the other add, edit, delete buttons to show on my grid.

i have checked and re-checked all the Forums... but no luck

Is there a FULL CODE EXAMPLE (i.e.  all the includes, html, the whole thing) someone can point me to?

Desperate.... deadline to meet.

05/03/2009
09:03
Avatar
jnavratil
Member
Members
Forum Posts: 23
Member Since:
12/02/2009
sp_UserOfflineSmall Offline

Rest assured, this does work!  My source  may be a bit more than you want, but I will send it to you via email if you contact me at john(dot)navratil(at)sbcglobal(dot)net.

Assuming you have the grid working as you like, the navgrid options are what you need.  Your HTML should include elements for both the grid and the pager (the navGrid), for example:

  <table id="grid" class="scroll">
  </table>
  <div id="pager" class="scroll" style="text-align:center;">
  </div>

You can chain the navgrid method after your jqGrid method call, like

            jQuery("#grid").jqGrid({
                ... your grid options here ....
                }).
            navGrid("#pager",
                {refresh: true, edit: false, add: true, del: true, search: true},
                { // edit
                 beforeSubmit: function() { alert('before edit submit'); }
                },
                { // add
                 beforeSubmit: function() { alert('before add submit'); }
                },
                { // delete
                beforeSubmit: function() { alert('before delete submit'); }
                }
                );

Note:  the navGrid method needs the id of the HTML element for the pager.  The next argument specifies which buttons to attach.  Here I do not have edit, but have selected add and deleted.  Following that are options for the edit, the add and the delete button, respectively.

I'm using jgQrid 3.4.  If you have the latest pdf documentation, refer to page 69.  It's the "Properties, Events and Methods" of the "Navigating" chapter.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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