Forum
07:12
23/12/2010
Hello Frineds,
I have created a jqGrid, in which there is a hyperlink named delete . In that link I want to pass the value of the first colunm. By default jqGrid passes the value of the row id.
datatype:"local",
width:330,
height:150,
colNames:['Denomination Id','Denomination','Delete'],
colModel:[
{name:'id',index:'id',align:'center',hidden: true,sortable:false,editable:false,edittype:"text",editrules:{required:true,edithidden: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
);
In the above example, in the addParam option I want to pass the value of the column named "Denomination Id".
How can I do it ?
Thanx in advance...
I think you need use custon button instead delete button.
http://www.trirand.com/jqgridw.....om_buttons
In button's event handler you need use
var rowId = $("#grid-selector").getGridParam("selrow");
and then use getRowData() grid's method.
10:33
23/12/2010
Hi Izemuroot,
In my case, I have to use hyperlink instead of custom buttons.By the way,I have solved the problem...
I have changed the values of rowId to denominationId...
{id:"1",denomination:"1000",deletelink:"Delete"},
{id:"3",denomination:"2000",deletelink:"Delete"},
{id:"4",denomination:"3000",deletelink:"Delete"},
{id:"2",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('addRowData',myData[index].id,myData[index]);
}
Its working fine now....
Thanx...
Most Users Ever Online: 715
Currently Online:
41 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