Hi,
I’ve had to change this to have it working:
if($(elc).get(0).type === ‘select-multiple’ && tmp) {
-> if($(elc).get(0).type === ‘select-multiple’ && tmp!==null) {
giuliano
thanks a lot 🙂
Hi,
I have no specific code to add a new record, as I use the default navGrid add button. Here’s my grid code:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
var lastSelO=""; $('#config-profili-orari').jqGrid({ datatype: 'json', url: '/admin/getConfigOrariProfiles', editurl: '/admin/setConfigOrariProfiles', method: 'GET', width: $('body').width()-60, shrinkToFit: true, height: "auto", sortorder: "desc", regional: 'it', loadui: 'disable', pager: '#config-profili-orari_pager', jsonReader : jsonReader, colNames:['id','Nome','Descrizione','Mesi','Giorni','Ore','Domain'], colModel:[ {name:'id',index:'id',hidden: true}, {name:'name',index:'name', editable: true, edittype:'text'}, {name:'description',index:'description', editable: true, edittype:'text'}, {name:'months',index:'months', editable: true, edittype:'select', formatter:'select', editoptions: monthslist}, {name:'weekdays',index:'weekdays', editable: true, edittype:'select', formatter:'select', editoptions: weekdayslist}, {name:'hours',index:'hours', editable: true, edittype:'select', formatter:'select', editoptions: hourslist}, {name:'domain',index:'domain', editable: true, edittype:'select', formatter:'select', editoptions: domainslist} ], onSelectRow: function(id){ if(id && id!==lastSelO){ jQuery('#config-profili-orari').saveRow(lastSelO); lastSelO=id; } jQuery('#config-profili-orari').editRow(id, true); }, loadComplete: function() { $("#config-profili-orari tr.jqgrow:even").addClass('evenRowClass'); $("#config-profili-orari tr.jqgrow:odd").addClass('oddRowClass'); } }) .jqGrid('navGrid','#config-profili-orari_pager',{ add: true, del:true, edit: true, search: false, refresh: false }); |
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top