Forum


20:36

11/02/2010

I'm having a problem getting data with getCell. Maybe it's just me doing something wrong, but I don't see it.
I have the following grid defined:
$("#grid").jqGrid({
datatype: "local",
height: 208,
colNames:['Id', 'Process','Description','Parent','Tier','Affected','Active'],
colModel:[
{name:'id', index: 'id', sortable: false, hidedlg: true, hidden: true },
{name:'process', index:'process', width:125 },
{name:'description',index:'desc', width:300},
{name:'parent',index:'parent', width:125 },
{name:'tier',index:'tier', width:60, align:"right",sorttype:"int"},
{name:'affected',index:'affected', width:60, align:"right" },
{name:'active',index:'active', width:60, align:"right" }
],
multiselect: false,
hidegrid: false,
forceFit: true,
caption: "Processes",
onSelectRow: grid_onSelectRow
});
Example row data:
{id:"93",process:"GPM",description:"CRM/GPM",parent_id:"12",parent:"Distribution",tier:"1",affected:true,active:true},
I have a function defined to handle the "onSelectRow" event:
function grid_onSelectRow( rowid, status )
{
alert( rowid + ": " + status );
var contents = $("grid").getCell(rowid, "id");
alert( contents );
}
but the final "alert" always displays "false". Incidentally, the first alert always displays the row number (1-6) and "true".
What am I doing wrong?
Most Users Ever Online: 715
Currently Online:
62 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