Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Problem with getCell
11/02/2010
20:36
Avatar
pconrey
New Member
Members
Forum Posts: 2
Member Since:
11/02/2010
sp_UserOfflineSmall Offline

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?

11/02/2010
22:26
Avatar
pconrey
New Member
Members
Forum Posts: 2
Member Since:
11/02/2010
sp_UserOfflineSmall Offline

Close topic.  I see the problem.  Missing "#" on selector in event handler.

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information