Forum
Topic RSS
18:09
20/08/2010
OfflineI have a grid that allows editing via built in form. two items are select boxes. When user hits submit, all but the values for select inputs are posted to the server. tried on two diff machines (linux and windows), same result.
code is: (fields are rowSts and rName)
$(document).ready(function(){
jQuery("#userList").jqGrid({
url:'/user/list?format=json',
editurl:'/user/edituser?format=json',
datatype: "json",
colNames:[,'Username', 'Email', 'First Name','Last Name','Last Logon','Status','Role'],
colModel:[
{name:'id',index:'id', width:1,editable:false,editoptions:{readonly:true,size:1},hidden:true},
{name:'uName',index:'uName', width:0,sortable:true,editable:true,editoptions:{size:30},editrules:{required:true}},
{name:'uEmail',index:'uEmail', width:400,editable:true,editoptions:{size:30},sortable:true,editrules:{required:true,email:true}},
{name:'fName',index:'fName', width:0,editable:true,editoptions:{size:20},sortable:true,editrules:{required:true}},
{name:'lName',index:'lName', width:0,editable:true,editoptions:{size:20},sortable:true,editrules:{required:true}},
{name:'lastLogon',index:'lastLogon', width:250,sortable:true,editable:false},
{name:'rowSts',index:'rowSts', width:0,sortable:true,editable:true,edittype:"select",editoptions:{value:{'active':'Active','suspended':'Suspended','defunct':'Defunct'}},editrules:{required:true}},
{name:'rName',index:'rName', width:0,editable:true,edittype:"select",editoptions:{value:"user:user;admin:admin"},sortable:true,editrules:{required:true}}
],
rowNum:10,
rowList:[10,20,30],
pager: '#userListPager',
sortname: 'uName',
viewrecords: true,
sortorder: "asc",
caption:"System Users",
autowidth:true,
height:300,
scroll:true,
loadComplete:function(){gridOnLoad();},
onSelectRow:function(){showEditRowButton();}
});
var grid = jQuery("#userList");jQuery("#btn-editRow").click(function(){
var selectedRow = grid.jqGrid('getGridParam','selrow');
if (selectedRow) {
grid.jqGrid('editGridRow',grid.jqGrid('getRowData',selectedRow).id,_editOptions);
} else {
simplePopupMessage({title:"Oops!",message:"Please select a row to edit.",class:'negative'});
}
});
}
Dumping the incoming variables to the server reveals that the selectors are not present
$params array(10) {
["controller"] => string(4) "user"
["action"] => string(8) "edituser"
["module"] => string(7) "default"
["format"] => string(4) "json"
["uName"] => string(4) "test"
["uEmail"] => string(7) "a@b.com"
["fName"] => string(4) "Dave"
["lName"] => string(5) "Jones"
["oper"] => string(4) "edit"
["id"] => string(1) "6"
}
I'd appreciate any comments on why this might be.
Most Users Ever Online: 994
Currently Online:
16 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
Log In
Home