Copy-Paste is not working for celltype "combo" - V3.6

Hello All,

We are using DHTMLX 3.6 Version . In one of the grids we have the copy/paste functionality is not working as expected.

  1. Combo box has text and value as key/value pairs . Whenever we copy paste the value the value pasted is not able to find the correct option and hence this is resulting in a Server side exception as we have few validations on this.

After looking into the code we found that

dhtmlXGridObject.prototype.pasteBlockFromClipboard (dhtmlx.js) invokes this.setValue = function(val) and this calls the below method.

dhtmlXCombo.prototype.getOption = function(value)
{
for(var i=0; i<this.optionsArr.length; i++)
if(this.optionsArr[i].value==value)
return this.optionsArr[i];
return null;
}

this.optionsArr is empty if the combo is not accessed atleast once .

Assuming “combo” access issue is resolved by useraction i.e. now optionsArr is populated with the options correctly , the value for field this.cell.combo_value is assigned in dhtmlx.js setValue method . But this assignment should happen only after calling getOption method which is not the case.

Could someone suggest if this is fixed in latest version on DHTMLX or is there any workaround for this.

Thanks,
Nishwanth

Unfortunately the issue cannot be reproduced with the latest dhtmlxsuite version .
Plea,se try to update your dhtmlx version. If the problem still occurs for you please, provide with a complete demo, where the problem can be reconstructed locally.

Hello,

We don’t see the cell type “combo” in the latest version . Could you please suggest any work around to load the optionsArr with values that are there in the combo-box for the copy paste functionality to work without any issues in version 3.6.

It is diffcult for us to shift to latest version for this issue alone.

Thanks,
Nishwanth

There is an “combo” excell in the 4.0 version. If the issue still occurs for you please, open ticket at support.dhtmlx.com and provide with a complete demo, where the problem can be reproduced locally.

Here you can find a tutorial about creating a complete demo:
docs.dhtmlx.com/auxiliary_docs__ … pport.html