Categories | Question details Back To List | ||
Custom eXcells and original values Hi! I have some troubles with custom eXcells. I created a new cell type for dates which uses a formatting function I already had in my scripts (kind of like php's 'date'). The Problem now is: How can I retreive the original, unformatted timestamp for sorting/filtering after it was converted to a string? I'm using this.setCValue() to set the value AND the original value, but the only way I found to get values was the innerHtml function. Here's my code: function eXcell_datum(cell){ this.base = eXcell_ro; this.base(cell); this.getValue = function(){ return this.cell.innerHTML.toString(); } this.setValue = function(val){ if (isNaN(Number(val))) { this.setCValue(""); } else { this.setCValue( formatDate("%l, %d.%m.%Y",Number(val)), Number(val)); } } } eXcell_datum.prototype = new eXcell; Answer posted by Support on Aug 12, 2008 06:57 You can store original data as part of cell. this.getValue = function(){ return this.cell._data; } this.setValue = function(val){ this.cell._data=val; //existing code... |