Hello,
I am using the delGridRow, everything works, in the message I add row data parameter to show the use which row they are deleting, but the variable seems to cache
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
var mydata = [{"id":"125","name": "Apple"},{"id":"254","name":"Orange"},{"id":"25",name:"Grapes"}] var mygrid = $("#grid"); function deleteRow() { var gr = mygrid.jqGrid('getGridParam','selrow'); if(gr != null) { var rdata = mygrid.jqGrid('delGridRow',gr,{ ... msg: 'Are you sure you want to remove ' + rdata.name + '?', ... }); } else { alert('please select row'); } } |
Everything works, user click on first row – apple – clicks delete – it ask – are you sure you want to delete Apple?
use select next row, clicks delete and it asks – Are you sure you want to delete Apple? instead of Orange.
When posted, all parameters are passed correctly and row correctly removed, but the message seems to cache to the first one
Any help appreciated.
Thanks,
Kris
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top