Forum


I have a multiselect gridtable with a link below to "save rows". But when I click on that link it doesn't save. I've checked w/ firebug and nothing is being sent... But when I do an alert, the values are there. Obviously I've got something wrong.
note - the ID is text and not an interger
Any hints?
jQuery("#newGrid").jqGrid({
url:'get.php?q=30'
, editurl: getr.php?q=31'
, datatype: "json"
, mtype: 'GET'
, loadtext: "Loading..."
, colNames:['Value']
, colModel:[
{name:'thevalue', index:'thevalue', width:198}
]
, sortname: 'thevalue'
, sortorder: "asc"
, pgbuttons: false
, pginput: false
, viewrecords: false
, rowList: []
, height: '100%'
, multiselect: true
, pager: jQuery('#newPager')
, imgpath: '/custom/javascript/jquery-1.2.6/jqGrid/themes/basic/images'
, caption: 'Experiments'
, width: "700"
, height: '100%'
}).navGrid("#newPager",{search:false,refresh:true,edit:false,add:false,del:false,position:'right'});
jQuery("#makeNew").click( function() {
var s;
s = jQuery("#newGrid").getGridParam('selarrrow');
for (x in s) {
var ret = jQuery("#newGrid").getRowData(s[x]);
var thevalue= ret.thevalue;
alert(thevalue);
jQuery("#newGrid").saveRow(thevalue);
}
});
thanks
13:02

08/09/2008

Hi.
You have to call your server code by yourself using an AJAX call or a window.open() javascript. For example in a custom button I export my grid to excel and then I use window.open to call a server side code this way:
function showReportWindow(tipo) {
var url = "/DomiciliacionPagos/Sector?oper=" + tipo;
window.open(url, "popup", "width=600,height=600");
}
HTH
04:49

Moderators
30/10/2007

Hello,
You mix inline edit with pure grid data.
You should make your own ajax call to save data this way.
Reagrds
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:
147 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