Forum


12:44

11/03/2010

hi,
jQuery("#list2").jqGrid({
datatype: 'local',
height:400,
colNames:['check','test'],
colModel :[
{name:'check'', index:'check'', width:55, sorttype:'int', hidden:true,align:'center',classes:"JqGrid"},
{name:'test', index:'test',width:75,align:'center',classes:"JqGrid"}
],
pager: '#pager2',
scroll: 0,
rowNum:0,
viewrecords: true,
caption: '',
gridComplete: function(){
var ids = jQuery("#list2").jqGrid('getDataIDs');
for(var i=0;i < ids.length;i++)
{
var cl = ids[i];
be = "<input style='width:75px;' id='showreport" + i + "' type='button' value='look' onclick="javascript:return doBack();" />";
jQuery("#list2").jqGrid('setRowData',ids[i],{test:be});
}
}
hi, this is just like the demo, and it works fine. the test column will show the buttons. But I need to get the button's id, in order to do somthing else.
I tried:
jQuery("#showreport1").attr("value","123");
but no luck, it seems can't affact the button's value at all. I think maybe the jqgrid change the input button's id by itself?
Please tell me how it construct it.
yours,
Ivan
13:47

Moderators
30/10/2007

Hello,
You can pas the id to the doBack() function as parameter
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:
52 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