Forum

July 12th, 2025
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
Inline Editing editRow aftersavefunc not firing
21/10/2009
11:16
Avatar
pgtip
Member
Members
Forum Posts: 5
Member Since:
08/04/2009
sp_UserOfflineSmall Offline

Hello,

I have searched the Help forum without an answer I can copy/deduce from. I want to

capture what is returned from the editurl POST. I have the following:

onSelectRow:    function(id)
{
if (id && id !== lastsel)
{
jQuery('#insertErrors').restoreRow(lastsel);
jQuery('#insertErrors').editRow(id, true, '',

refresh, '', '', savedResponse, '', '');
lastsel = id;
}
},

editurl:        'upload_row_validate.php?&manuf=' + manuf + '&link=' +

errorlink + '&postdt=' + postdt

refresh fires (in the successfunc parameter role) which changes the url and

reloads the grid after upload_row_validate.php has done its thing – working fine.

I have created functions for the different option in editRow (e.g. oneditfunc) to

make sure my parameters were correct – they all fire except the aftersavefunc

(called savedResponse here).

The editurl returns in Firefox firebug:

<?xml version='1.0' encoding='utf-8'?>
<row><saved>True</saved><insertcnt>1</insertcnt><errorcnt>12</errorcnt></row>


I thought the savedReponse would then supply the rowid & server
response so the function reads:

function savedResponse(rowid, responseXML)
{
alert(rowid);
alert(responseXML);
}

savedResponse does not fire.

I tried inserting the line

jQuery('#insertErrors').saveRow(id, '', '', '', savedReponse, '', '');


after

jQuery('#insertErrors').editRow(id, true, '', refresh, '', '', savedResponse, '', '');


and as soon as I edit the row - saveRow fires (and
savedResponse is called) which again suggests my parameters
are correctly positioned though I want saveRow to fire
after editRow 'enter' is received.

The POST response of the editurl is 200 OK so I don't know
what 'triggers' aftersavefunc.

I thought perhaps it is the successfunc that returns the
info so I tried that - I get an object XMLHttpRequest passed
to it which is not what I need.

Any help/pointers appreciated.

Thank you,

[What jqGrid can do and how you can mix and match - very impressive.]

23/10/2009
11:35
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

It is a long story to explain - short maybe it should be fixed.

1. in successfunc is passed the response - so you should response.responseXML (in your case)

2. in aftersavefunc is passed response.responseText

The fix should pass the response on both events.

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.

26/10/2009
13:37
Avatar
pgtip
Member
Members
Forum Posts: 5
Member Since:
08/04/2009
sp_UserOfflineSmall Offline

Hi Tony,

Thanks for the help. Just to complete the thread.

Using successfunc (in my case called 'refresh') with what you said

reads something like

function refresh(response)

{

var xml = response.responseXML.documentElement;

alert(xml.getElementsByTagName("errorcnt")[0].firstChild.data):

}

gives me the number inside <errorcnt>12</errorcnt>.

Thanks,

27/10/2009
03:59
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Fixed. 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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

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