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
Jqgrid not updating a column with Set Row Data Method
24/07/2014
04:03
Avatar
DGS
New Member
Members
Forum Posts: 1
Member Since:
24/07/2014
sp_UserOfflineSmall Offline

I have a Jqgrid with a Checkbox given in the header Section.

colNames: ['', '', '<input type="checkbox" id="chkmultiSelect" onclick="abc(event)"/>'],

colModel: [

{ name: 'ID', index: 'ID', hidden: true, key: true },
{ name: 'RI', index: 'RI', hidden: true },
{ name: 'Sel', index: 'Sel', edittype: "checkbox", search: false, width: 22,
formatter: function(cellvalue, options, rowObject) {
switch (cellvalue) {
case "Yes": return "<img src='../../Images/ChkChk.gif' alt='Yes' onclick='checkGridRow(" + options.rowId + ")' />";
break;
default: return "<img src='../../Images/ChkBlank.gif' alt='No' onclick='checkGridRow(" + options.rowId + ")' />";
break;
}
}, unformat: imageUnFormat
}]

----------------------

This is the scenario

Initally when Page Loading all the columns will be coming with out check box. When i clicked the chkmultiselect i want to mark checked in my columns. ie Update with another tag  "<img src='../../Images/ChkChk.gif' alt='Yes' onclick='checkGridRow(" + options.rowId + ")' />"

 

My abc Event: I want to update my "Sel" column with chkchk image.

function abc(e) {
e = e || event; /* get IE event ( not passed ) */
e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;
var mydata = $("#list").jqGrid('getGridParam', 'data');
var gridId = jQuery("#list").getDataIDs();
//loop through grid rows
for (var countRow = 1; countRow <= gridId.length; countRow++) {
var rowId = gridId[countRow];
var beChecked = "<img src='../../Images/ChkChk.gif' alt='Yes' onclick='checkGridRow(" + rowId + ")' />";
var inputControl = beChecked;
jQuery("#list").jqGrid('setRowData', rowId, {Sel: "<img src='../../Images/ChkChk.gif' alt='Yes' onclick='checkGridRow(" + rowId + ")' />" });
}
if ($('#chkmultiSelect').is(':checked')) {
$('#chkmultiSelect').prop('checked', true);
}
else {
$('#chkmultiSelect').prop('checked', false);
}
}

 

I am getting my chkmultiselect functioning correctly. but the grid column sel is not updating.

This is very urgent for me.. Any guesses why?

 

ThanksDGS

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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