asp.net mvc - Hide the column and show the field when edit or add in jqGrid -
i have more colimns in jqgrid . need hide columns(fields) in jqgrod. when edit or add need show fields in jqgrid edit popup or add popup. there property this.
code :
$("#datasourcegrid").jqgrid({ postdata: { caid: function () { return $('#hdnchnappid').val(); } }, colnames: ['datasourceid', 'title','sort order'], colmodel: [ { name: 'datasourceid', index: 'datasourceid', align: 'left', key: true, editable: false, hidden: true, search:false,width: '10'}, { name: 'datasourcetitle', index: 'datasourcetitle', sortable: true, align: 'left', width: '400',editable: true, edittype: 'text', editrules: { required: true },stype:'text', search:true,searchoptions:{sopt:['eq']}}, { name: 'sortorder', index: 'sortorder', sortable: true, align: 'left', width: '100',editable: true, hidden: true, edittype: 'text', editrules:{number:true, required:true}, search:false}, ],
you can add edithidden:true
editrules
of hidden: true
column, check jqgrid wiki on editrules section more options.
Comments
Post a Comment