Forum
09:05
02/01/2009
I am looking for a way to prevent the editCell functionality from working depending on the value of a different column on that row.
I am looking for a quick suggestion on how the value can be access from line 65 in celledit.js.
I believe that if another condition could be added to the if statement that converts a cell to an input the conversion could be prevented.
if ($t.p.colModel[iCol].editable === true && ed === true) {.....}
I've tried $t.p.getCell(3,2) but it did not work from this code point.
as in:
if ($t.p.colModel[iCol].editable === true && ed === true && $t.p.getCell(3,2) === true) {.....}
Thanks,
RobGMiller..
11:30
02/01/2009
After reading a suggestion in this forum, I tried to use beforeEditCell to detect the value of the conditionnal field. It will run a function that tests the conditionnal field and returns true or false. As follows:
var allowedit = true;
if ($.isFunction($t.p.beforeEditCell)) {
allowedit = $t.p.beforeEditCell($t.rows[iRow].id, nm, tmp, iRow, iCol);
}
if (allowedit) {
$(cc).html("").append(elc); ...............
}
Most Users Ever Online: 715
Currently Online:
32 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