Forum
11:42
08/02/2010
Hi Tony,
I have a grid which shows some of the column in a editable mode & other columns in a non-editable mode when it loads. i could achieve this grid through afterInsertRow event. But i am not able to do sorting. My code is :
jQuery(document).ready(function(){
var mygrid = jQuery("#list").jqGrid({
url: '<s:url namespace="/list" action="list" />',
datatype: 'json',
width: 940,
mtype: 'POST',
colNames:['Col 1', 'Col 2','Col 3'],
colModel:[
{name:'col1',index:'col',width:200,searchoptions:{sopt:['bw']}},
{name:'col2',sortable:false,search:false,width:180,align:"center",editable: true},
{name:'col3',sortable:false,search:false,width:180,align:"center",editable: true}
],
jsonReader : {
repeatitems: false
},
rowNum:10,
rowList:[5,10],
pager:'#navigatorBar',
viewrecords: true,
height: 'auto',
width: 'auto',
altRows: true,
caption: "Example",
afterInsertRow: function(id,data) {
jQuery('#list').jqGrid('editRow',id);
}
})
.navGrid('#navigatorBar',{edit:false,add:false,del:false,searchtext:"Search",refresh:false},//options
{},//edit options
{},//add options
{},//del options
{}, //search
{} //view options
) // END OF navGrid
});// END OF ready function
if i dont give jQuery('#list').jqGrid('editRow',id); inside afterInsertRow event it sorts.
Am i doing anything wrong? Or is there any other way to achieve this?
14:30
Moderators
30/10/2007
Hello,
Currently sorting is disabled when some row is edited with inline or cell edit.
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.
Most Users Ever Online: 715
Currently Online:
40 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