Hi,
In a column, I am showing check boxes. I want the value of column to be other than true or false. I want to set these values from xml.
Regards,
Ashutosh Agarwal
Such functionality is not available, checkbox columns has hardcoded 0 and 1 as values for checked and unchecked states, the only way to change behavior - customization of js code.
If necessary I can provide additional info where customization need to be done ( there is no ready to use solution )
Yes please provide additional info where customization need to be done.
dhtmlxgridcell.js lines 476
if(this.val==“1”) //need to be updated with necessary checked value
this.setValue(“0”) //need to be updated with necessary unchecked value
else
this.setValue(“1”) //need to be updated with necessary checked value
dhtmlxgridcell.js lines 517
if (val){
val=val.toString()._dhx_trim();
if ((val==“false”)||(val==“0”)) val="";
}
if(val){ //need to be updated with correct rule
val = “1”;
this.cell.chstate = “1”;//need to be updated with necessary checked value
}else{
val = “0”;
this.cell.chstate = “0”//need to be updated with necessary unchecked value
You can replace mentioned places with another hardcoded value, or with some js vars which will be set separatly