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_Related Related Topics sp_TopicIcon
Custom Ajax Operation
22/11/2012
00:29
Avatar
dadeishk
New Member
Members
Forum Posts: 1
Member Since:
22/11/2012
sp_UserOfflineSmall Offline

Built into jqGrid are some ajax posts such as "add" "edit" "delete".  For example on an add method posts the following to the server:

oper=add&id=_empty&field1=value1&field2=value2 etc.

Is there a way to create a Custom Operation?  For example, I may add a "Do Something" button to each line in the grid.  When the "Do Somthing" button is pressed, jQGrid posts

oper=dosomething&id=99&field1=value1&field2=value2 to the server.

If this isn't built in, then I need an example of how I can send row-data to the server when a custom button is pressed.

22/11/2012
11:52
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

You can change the post (when a add/edit/dell) data in a way you wanr.

Please look into the documentation for serializeEditData event.

The very natural way is if a button is clicked you

1. Get the selected row via selrow

2. get the row data via getRowData

3. configure your data with parameter you want and and make your own ajax call.

Regards

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:
55 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