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_Related Related Topics sp_TopicIcon
setCell() saves data as undefined
22/09/2010
16:55
Avatar
Seroczynski
The Netherlands
Member
Members
Forum Posts: 17
Member Since:
10/02/2010
sp_UserOfflineSmall Offline

Hello again,

Once again I'm in some need for asistance, this time with the setCell() method. I'll jump straight in with the script for my grid.

jQuery(document).ready(function(){ 
jQuery('#Algemeen').jqGrid({ 
hidegrid: false, 
width: 860, 
height: 500, 
xmlReader: { 
root: 'Grid', 
row: 'Rij', 
page: 'Grid>Pagina', 
total: 'Grid>Paginas', 
records: 'Grid>Records', 
repeatitems: false, 
id: 'AKID' 
}, 

url: 'functions/JqGridData.php', 
datatype: 'xml', 
mtype: 'GET', 
colNames: ['Del', 'IMG', 'ID', 'IMGURL'], 
colModel: [ 
{name: 'Del', index:'Acties', width:10, sortable:false, align:'center'}, 
{name: 'IMG', index:'Image', width:10, sortable:false, align:'center'}, 
{name: 'AKID', index: 'AKID', width: 25,  editable: true,  editoptions:{size:2.5, readonly:false}}, 
{name: 'IMGURL', index: 'IMGURL', width: 70,  editable: true,  editoptions:{size:7, readonly:false}},], 
gridview: true, 
gridComplete: function() { 
var ids = jQuery('#Algemeen').jqGrid('getDataIDs'); 
for(var i=0;i < ids.length;i++) { 
im = "<img src='layout/img/icons/browse_klein.png' style='cursor:pointer;' onclick=\"jQuery.customMethod();\" />"; 
jQuery('#Algemeen').jqGrid('setRowData',ids[i],{IMG:im}); 
} 
}, 
...
});

I'm trying to edit a column from a onclick event on a button.

jQuery('#Algemeen').setCell('row', 'column', 'someRandomText', undefined, undefined, false);

This seems to work, the value of the desired column changes to the expected value. But once I try to save the value, undefined is being send to the database, which obviously isn't what I wanted. I've tried several things but none seem to fix this issue. What am I doing wrong here?

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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