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
loadComplete/setRowData : elem[0] undefined
04/02/2009
03:27
Avatar
rsea
Member
Members
Forum Posts: 17
Member Since:
24/01/2009
sp_UserOfflineSmall Offline

hi,

I'm trying to populate the act column of my table with a simple image but when grid is loaded nothing appears and firebug shows the following error:

elem[0] is undefined
formatter()()grid.base.js (line 683)
populate()()grid.base.js (line 1498)
(?)()()grid.base.js (line 311)
each()()jquery.js (line 686)
each()()jquery.js (line 153)
setRowData()()grid.base.js (line 306)
each()()jquery.js (line 686)
each()()jquery.js (line 153)
setRowData()()grid.base.js (line 299)
loadComplete()()collecti...n_grid.js (line 433)
complete()()grid.base.js (line 869)
complete()jquery.js (line 3533)
onreadystatechange()()jquery.js (line 3485)
[Image Can Not Be Found]elem[0].title = elem[0].textContent || elem[0].innerText;

I'm pretty sure that the problem is setRowData, I've tried to insert the images using firebug's console and i've got the same error.

The code with problem:

loadComplete: function(){
    var ids = $("#list").getDataIDs();
    for(var i=0;i<ids.length;i++)
    {
      var cl = ids[i];
      menu = "<img class='openmenu' width='12' height='12' src='/images/menu.png' />";
      $("#list").setRowData(ids[i],{act:menu});
    }
    $('GridHeader, grid_hdiv, grid_bdiv, pager').css({'width':'550px'});
}

Thanks in advance.

Greetings,

Rodolfo.

05/02/2009
01:55
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

The most common problem here is maybe that you have no consistency in the colModel and data returned from server - i.e you have in the data more columns, but not in colModel

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.

06/02/2009
16:37
Avatar
rsea
Member
Members
Forum Posts: 17
Member Since:
24/01/2009
sp_UserOfflineSmall Offline

Thanks Tony! You are awesome!

I had 20 entries in colmodel but server was sending only 18...

Have a great weekend!

Rodolfo.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
39 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