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
afterInsertRow event fail
23/02/2010
17:02
Avatar
pctotalsantafe
Member
Members
Forum Posts: 6
Member Since:
28/01/2010
sp_UserOfflineSmall Offline

When i'm work with 3.5 version

afterInsertRow: function(rowid){

var esta=$("#grid").getRowData(rowid);

}

this is working perfectly.

I change to 3.63 and

afterInsertRow: function(rowid){

var esta=$("#grid").jqGrid('getRowData', rowid);

}

not work.

I don't know if this is or not a bug but i need a solution

Thanks from Argentina

Sebastian

24/02/2010
19:48
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Seems like you do not have clear the cache. What is the error reported?

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.

24/02/2010
21:25
Avatar
pctotalsantafe
Member
Members
Forum Posts: 6
Member Since:
28/01/2010
sp_UserOfflineSmall Offline

Complete code within afterInsertRow options

   afterInsertRow: function(rowid){
            var esta=$("#factura").jqGrid('getRowData',rowid);
            var pie=$("#factura").jqGrid('footerData');
            if (pie.totsiva>0){
                var neto=parseFloat(pie.totsiva) + parseFloat(esta.totsiva);
                var ivas=parseFloat(pie.totiva) + parseFloat(esta.totiva);
                var totals=parseFloat(pie.total) + parseFloat(esta.total);  
            }else{
                var neto=parseFloat(esta.totsiva);
                var ivas=parseFloat(esta.totiva);
                var totals=parseFloat(esta.total);
            }  
            $("#factura").jqGrid('footerData', 'set',{final:'TOTAL:'},false);
            $("#factura").jqGrid('footerData', 'set',{totsiva:neto},true);
            $("#factura").jqGrid('footerData', 'set',{totiva:ivas},true);
            $("#factura").jqGrid('footerData', 'set',{total:totals},true);
            $("#contefactura #montototal").html('<font size="3" color="red"><b>$  '+parseFloat(totals).toFixed(2)+'</b></font>');
                $("#confirmacion #monto").attr('value', '$ '+parseFloat(totals).toFixed(2));
        },

I clean the cache and nothing happens.
Also if I change the rowid variable with a value of id known the code works as I understand that what is wrong is the method that retrieves the id which is inserted in the grid.

Thanks for everything

Sebastian

26/02/2010
18:32
Avatar
pctotalsantafe
Member
Members
Forum Posts: 6
Member Since:
28/01/2010
sp_UserOfflineSmall Offline

I don't know why but this is what returns afterInsertRow

rowid: [object HTMLTableElement]

rowdata: 23                     (gridrow id)

rowelem: [object Object]

Is a bug ???

Greetings

26/02/2010
20:20
Avatar
haypet
Member
Members
Forum Posts: 11
Member Since:
25/02/2010
sp_UserOfflineSmall Offline

I experienced same problem after upgrading to 3.6.4 too. It seems that order of event parametrs had changed.

Prior to 3.6.4 following signature would work:

afterInsertRow: function(rowid, rowdata, rowelem)

With 3.6.4 you will have to change order of parametrs to get correct data:

afterInsertRow: function(rowelem, rowid, rowdata)

Thanks

26/02/2010
21:59
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thanks. If this is the case

http://github.com/tonytomov/jq.....cf08b31489

it is fixed.

Best 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: 715

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