I need to store one more value at dhtmlxgrid exclude the cell display value.
any variabel i can use to store this value
i want to create a new excell for grid…
here is my code…
function eXcell_LinkPop(cell){
var temp;
if (cell){
this.cell = cell;
this.grid = this.cell.parentNode.grid;
}
this.edit = function(){
var value = getvalue();
this.cell.innerHTML = “<input type=“text” value=”"+value+"\n>);
this.cell.childNodes.onclick=function(e){ (e||event).cancelBubble=true; }
}
this.setValue=function(val){
var rssplit = val.split("^");
this.setCValue(rssplit[0]+" "+rssplit[1]);
temp = val; (i need to store the original value)
}
this.getValue=function(){
var val = temp; (i need to get the original value)
return this.cell.innerHTML;
}
this.detach=function(){
return this.val!=this.getValue();
}
}
eXcell_LinkPop.prototype = new eXcell;
the input at cell should be abc^Link
how can i store the orginal value??
i think i cannot use your last suggestion because i need to store not at the cell.
thanks
how can i store the orginal value??
You can store original cell value at the cell’s object property:
this.setValue=function(val){
var rssplit = val.split("^");
this.setCValue(rssplit[0]+" "+rssplit[1]);
this.temp=val
}
this.getValue=function(){
var val = this.temp;
return this.cell.innerHTML;
}
Dear dhtmlx support,
i follow your suggestion already but i got error.
the variabel this.temp is undefined at this momment.
btw where can i define this temp variabel.
because when i define temp variabel use below code is not work.
function eXcell_LinkPop(cell){
var temp;
if (cell){
this.cell = cell;
this.grid = this.cell.parentNode.grid;
}
this.edit = function(){
var value = getvalue();
this.cell.innerHTML = “<input type=“text” value=”"+value+"\n>);
this.cell.childNodes.onclick=function(e){ (e||event).cancelBubble=true; }
}
this.setValue=function(val){
var rssplit = val.split("^");
this.setCValue(rssplit[0]+" "+rssplit[1]);
this.temp = val;
}
this.getValue=function(){
var val = this.temp;
return this.cell.innerHTML;
}
this.detach=function(){
return this.val!=this.getValue();
}
}
eXcell_LinkPop.prototype = new eXcell;
very appreciate if you can give me the solution…
Thanks
Hi dhtmlx support…
How about this question…
If you need to store value persistently , you can update your code as
this.setValue=function(val){
var rssplit = val.split("^");
this.setCValue(rssplit[0]+" "+rssplit[1]);
this.cell.temp = val;
}
this.getValue=function(){
return this.cell.innerHTML;
}
this.getSecondValue=function(){
return this.cell.temp;
}
And use
mygrid.cells(id,ind).getSecondValue();
To get second part of value from the cell.
while this.temp saves data for current access session only, this.cell.temp will save data for row existence time.