Forum
15:28
23/12/2010
Hello Friends,
I have used jqGrid in my jsp page . I want to hide the column named "Id" , but I can not. I have written my code below :
$(document).ready(function(){
var myData=[
{id:"1",denomination:"1000",deletelink:"Delete"},
{id:"2",denomination:"2000",deletelink:"Delete"},
{id:"3",denomination:"3000",deletelink:"Delete"},
{id:"4",denomination:"4000",deletelink:"Delete"},
{id:"5",denomination:"5000",deletelink:"Delete"},
{id:"6",denomination:"6000",deletelink:"Delete"},
{id:"7",denomination:"7000",deletelink:"Delete"},
{id:"8",denomination:"8000",deletelink:"Delete"},
{id:"9",denomination:"9000",deletelink:"Delete"},
{id:"10",denomination:"10000",deletelink:"Delete"},
{id:"11",denomination:"11000",deletelink:"Delete"},
{id:"12",denomination:"12000",deletelink:"Delete"},
];
jQuery('#listData').jqGrid({
datatype:"local",
width:330,
height:150,
colNames:['Denomination Id','Denomination','Delete'],
colModel:[
{name:'id',index:'id',align:'center',hidedlg:true,sortable:false,editable:false,edittype:"text",editrules:{required:true}},
{name:'denomination',index:'denomination',sortable:false,align:'center',editable:true,edittype:"text",editrules:{number:true,required:true}},
{name:'deletelink',index:'deletelink',sortable:false,editable:false,formatter:'showlink',align:'center',editrules:{required: true},formatoptions:{baseLinkUrl:'deleteDeno.htm',addParam:'&action=delete'}}
],
pager: '#pager',
viewrecords:true,
emptyrecords: "Nothing to display",
multiselect:false
}).navGrid('#pager',
{edit: false, add: false, del:false, search: false, refresh: false },
{}, // Default for edit
{},//Default for add
{}//Default for delete
);
for(var index=0;index<myData.length;index++)
{
jQuery("#listData").jqGrid('addRowData',index+1,myData[index]);
}
});
</script>
I have used hidedlg:true , but its not working. Can u help me ?
Thanx In Advance,
Gunjan Shah.
15:33
10/08/2009
Hi Gunjan,
you should use hidden:true instead of hidedlg:true, which has another meaning.
Best regards
Oleg
18:32
09/04/2009
add .hideCol('id') to the end like this: http://stackoverflow.com/quest.....-in-jqgrid
Most Users Ever Online: 715
Currently Online:
46 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