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
setGridParam not recognized
06/08/2009
09:33
Avatar
ImMoog
Guest
Guests

Hello !

First of all: thats the greatest jquery plugin I know, great job :)

I currently have a little problem with the setGridParam method.

Im trying to send 2 parameters to the server with postData in order to change my query (the grid is still the same); here's the code :

$(”#list”).setGridParam({postData: { qtype: f, query: q}});

$('#list').trigger('reloadGrid');

Note : jqGrid version : jqGrid  3.5-beta – jQuery Grid // Date:2009-05-24 build 12

Everything should work without problems but i got a “$(”#list”).setGridParam is not a function” in firebug and nothing happend.

Im certainly missing something…

Does anyone have an idea ?

Thanks in advance :)

Regards,

M.

06/08/2009
10:01
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

$(”#list”).setGridParam({postData: { qtype: 'f', query: 'q'}});

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.

06/08/2009
10:30
Avatar
ImMoog
Guest
Guests

Hello tony, thanks for the input.

f & q are text variables that contains the values i want to send.

Btw i've updated my jqgrid.js and included all the module (im still in a test environnement so its not a problem) and know, I dont get the error anymore but nothing is posted.

Heres the complete code :

        $("#list").jqGrid({
            url: '/Json/ShowjqGrid/',
            datatype: 'json',
            mType: 'POST',
            colNames: ['Id', '', 'Date', 'Title', 'DocType', 'BusinessFocus', 'GeographicScope', 'Info', 'Edit', 'Remove'],
            colModel: [
                                 { name: 'id', index: 'id', width: 55, resizable: true },
                                 { name: '', index: 'link', width: 20, resizable: false },
                                 { name: 'date', index: 'date', width: 100, resizable: true, sortable: true },
                                 { name: 'title', index: 'title', width: 160, resizable: true, sortable: true },
                                 { name: 'doctype', index: 'doctype', width: 150, resizable: true },
                                 { name: 'businessfocus', index: 'businessfocus', width: 150, resizable: true },
                                 { name: 'geographicscope', index: 'geographicscope', width: 150, resizable: true },
                                 { name: 'info', index: 'info', width: 50, resizable: false },
                                 { name: 'edit', index: 'edit', width: 50, resizable: false },
                                 { name: 'remove', index: 'remove', width: 50, resizable: false }
                                 ],
            pager: $('#pager'),
            pgbuttons: true,
            rowNum: 50,
            rowList: [15, 25, 50],
            sortname: 'id',
            sortorder: 'asc',
            viewrecords: true,
            multiselect: false,
            height: 300,
            width: 1000,
            gridComplete: function() { // popup tooltip !
                            // removed for clarity
                });
            }
        });

and the setgridparam method (used on a link outside of the grid)

$("#list").setGridParam({postData: { qtype: 'xxx', query: 'yyy'}});

$('#list').trigger('reloadGrid');

But still, nothing happend and nothing is posted in firebug.

06/08/2009
11:00
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

mType: 'POST',

should be

mtype: 'POST',

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.

06/08/2009
11:08
Avatar
ImMoog
Guest
Guests

Dear tony,

i tried to change the name of the mtype option without success.

I started a new page and did the exact same grid as before and this time... it worked !

I have absolutely no clues of what was the problem... but everything works like a charm now.

Thanks a lot for your dedication & your hard work.

Regards,

M.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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