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
Fix problem with aftersavefunct in saveRow
12/11/2012
13:14
Avatar
crilla86
Member
Members
Forum Posts: 8
Member Since:
10/05/2011
sp_UserOfflineSmall Offline

Hi all, i see the following problem.

When i save the editing of a row, and my grid is not 'clientarray', it starts a request to the url and in the success of the request i have this piece of code.

if (ret===true) {
                                            if($t.p.autoencode) {
                                                $.each(tmp,function(n,v){
                                                    tmp[n] = $.jgrid.htmlDecode(v);
                                                });
                                            }
                                            tmp = $.extend({},tmp, tmp2);
                                            $($t).jqGrid("setRowData",rowid,tmp);
                                            $(ind).attr("editable","0″);
                                            for( var k=0;k<$t.p.savedRow.length;k++) {
                                                if( $t.p.savedRow[k].id == rowid) {fr = k; break;}
                                            }
                                            if(fr >= 0) { $t.p.savedRow.splice(fr,1); }
                                            $($t).triggerHandler("jqGridInlineAfterSaveRow", [rowid, res, tmp, o]);
                                            if( $.isFunction(o.aftersavefunc) ) { o.aftersavefunc.call($t, rowid,res); }
                                            success = true;
                                            $(ind).unbind("keydown");

The problem is this line : if( $t.p.savedRow[k].id == rowid) {fr = k; break;}, because the break statement stops the ajaxRequestEvent, and the aftersavefunc never fires.

** sorry, it's not true; infact, if i don't try to debug it using firebug, everything works.

Instead when i use the debug, the break statement stops the ajaxRequestEvent and i can't conitnue the debud after that statement.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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