drag and drop and setNumberFormat problem

Hi, i have the version 2.6 of dhtmlx and i have a problem when using drag and drop and setNumberFormat, when i drop a field that have a value “0” with format , this value in the dropped field are empty, can you help me please!Thanks

Please provide us complete demo and steps to reproduce this issue.

Here is the code:

Test

And here is the xml:

<?xml version="1.0" encoding="UTF-8" ?> A1 - E373334 0 46 Tess - E373334 0 46 A2 - E348067 1205.50 0 PP1de31 - PP1de31 100,31 0

if column type = “edn” and have a value = “0,0” with mask of setNumberFormat, after drop the value are empty, and if column type = “ron” and have a value = “0,0” with mask of setNumberFormat, after drop the value are “0”.

Thanks

To fix behavior, add the next code snippet directly to the page orf to the end of dhtmlxgridcell.js

eXcell_edn.prototype.setValue=function(val){
if (!val||val.toString()._dhx_trim() == “”){
this.cell._clearCell=true;
return this.setCValue(“0”,0);
} else
this.cell._clearCell=false;
this.setCValue(this.grid._aplNF(val, this.cell._cellIndex));
}
eXcell_ron.prototype.setValue=function(val){
if (val === 0){}
else if (!val||val.toString()._dhx_trim() == “”){
this.setCValue(“0”,0);
return this.cell._clearCell=true;
}
this.cell._clearCell=false;
this.setCValue(val?this.grid._aplNF(val, this.cell._cellIndex):“0”);
}

It will change behavior of edn and ron excells

Hi Olga, i put the code directly in the page and the value put fine, but i have a javascript error: this._h2 is undefined, i see the error happen in js dhtmlxtreegrid_lines.js in the next function:

this.attachEvent(“onBeforeRowDeleted”,function(id){
var self=this;
var z=this._h2.get[id];
var w=null;
if (z.index!=0)
w=z.parent.childs[z.index-1];
z=z.parent;

	window.setTimeout(function(){
		z  = this._h2.get[z.id]; <----------- in this line
		if (!z) return;
					
		self._updateLine(z);
		self._updateParentLine(z);
		
		if (w){
			self._updateLine(w);
			if (w.state=="minus")
			self._h2.forEachChild(w.id,function(z){
				self._updateParentLine(z);
			},this);
		}
	},1);
	return true;
});

}

and i made a mistake, the version of dhtmlx is 2.5

Thanks

Unfortunately we cannot reproduce this issue locally. Please open ticket at support.dhtmlx.com/ and provide us complete demo where we can reproduce it.