Forum



15:57

27/02/2012

I have formatters on visible cells that combine values on two or more hidden cells. I do editing in another area of the web page and pass the values to the grid's hidden cells using the setCell function. The formatters are not updating the visible cells, although I thought that they were once doing so. I am not detecting any web page errors.
The formatters work when data is initially loaded. Since my editing also writes values into the database, re-running the web page will show my changes in the formatted cell. I don't want to reload the entire grid upon each data save, which is why I am attempting to change the grid cells as I save to the database.
This is my formatter function. I would like it to execute if I change the grid cells that contain values such as sAlertType, sNotifyTrigger, IUnits, etc. I've tried pasting as text and word, but both do not show well in this post. Text loses indents. Word loses linewraps.
function triggerFormatter(cellvalue, options, rowObject) {
var value = '';
var date;
switch (rowObject.sAlertType) {
case 'N':
value += 'Change in ';
value += rowObject.sNotifyTrigger;
break;
case 'SR':
case 'PR':
case 'R':
value += rowObject.IUnits;
value += ' ';
value += rowObject.sUnitOfMeasure;
value += '(s) ';
if (rowObject.sTimeRelation == '-')
value += 'prior to ';
else
value += 'after ';
if ((typeof (rowObject.sNotifyTrigger) != 'undefined') && rowObject.sNotifyTrigger != null) {
value += rowObject.sNotifyTrigger;
}
value += ' (';
try {
if (eval('rowObject.' + rowObject.sNotifyType)) {
date = new Date(parseInt(eval('rowObject.' + rowObject.sNotifyType + '.substr(6)')));
value += $.datepicker.formatDate('mm/dd/yy', date);
}
else
value += '[blank]';
}
catch (e) {
if (typeof (rowObject.sNotifyType) != 'undefined') {
if (rowObject.sNotifyType != '')
value += '[' + rowObject.sNotifyType + ']';
}
}
value += ')';
break;
case 'W':
value += 'Watch folder ';
if (rowObject.sInherit == 'Subs')
value += '(including subs) ';
break
default:
value += 'N/A';
break;
}
return value;
}
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66