Forum


04:54

24/04/2009

Hey!
I have some probleme with grid reloading.
When i edit a row, and i submit it, the submitted data will be entered to the row, but the whole grid is not reloading.
I need a method to reload my grid AFTER the server side scritps done their job, in other words i need the following to happen:
1. Grid sends the edited values through POST to the server
2. Server (PHP, MySQL) processes the data
3. Server gives a trigger to the grid to reload
I tried some stuff, but currently im clueless. Anyone have some idea how to manage this?
Thanks in advance!
KBB
12:18

23/04/2009

Hello All,
I would like to give you additional informations for this thread.
We call a stored procedure after submit. In this procedure does some calculation and update some rows in mysql table.
If it possible, we would like to call a function that reload the grid from this db table with same parameters like before.
would you be so kind as to give us a example or solution for this issue.
Thanx for your cooperation.
Guszti
06:38

Moderators
30/10/2007

Hello,
I suppose that you use inline editing, since in form editing this behaviour is by default.
In order to do that you need to use succesfunc and aftersavefunc - see documentatiopn. If all data is posted with succes you can use trigger("reloadGrid") in aftersavefunc.
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.
12:03

24/04/2009

Hi Tony!
Thanks for your response, it helped me to see a little more clearly, yet i cannot make it works.
Sure, i need to use the aftersavefunc so i need to make a saveRow somehow like this:
jQuery('#list').saveRow(rowid, succesfunc, url, extraparam, aftersavefunc);
and i should declarate an aftersavefunc function to reload our grid.
Thats clear, but WHERE i supposed to call the saveRow? Currently our grid sends the data when the user hit the ENTER key. Thats good for us, we wanted to do this way, but i dont know where to rewrite the action for the ENTER key.
I cannot find the proper event in the basic grid events to call the afterSave function.
Could you help us to solve this, please?
Thank you in advance!
KBB
08:11

Moderators
30/10/2007

Hello,
Please use editRow. EditRow call saveRow - and a lot of parameters in editRow are passed in saveRow. Please read the docs.
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:
107 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