export cvs to Excel with List type


Problem when you use the dhtmlxgrid_nxml.js file that has the Label parameter grid.serializeToCSV(true) with a Link type column.



Loaded Values:



Value of col1: Allianz SE (100146)^javascript:DisplayList(“100146”);^_Self



Value of col2: Hauser,Heijo



Example: serializeToCSV(true);



Value of col1: javascript:DisplayList(“100146”);



Value of col2: blank



Example: serializeToCSV(false);



Value of col1: Allianz SE (100146)^javascript:DisplayList(“100146”);



Value of col2: Hauser,Heijo^

How to export just the display value of the Link column?

Add next line before grid init

eXcell_link.prototype.getTitle = eXcell_link.prototype.getContent;

As result the serializeToCSV(true); command , will return content of link, instead of href


Thanks, It works.



Will the next version have this incorporated, or will I always have to provide this overide?

We not plan to provide such change as part of main codebase. Current approach, when getTitle method returns href is logical in most cases.


Since upgrading to dhtlmx 2008 Rel 3 of grid, the above workaround does not work any more as the serializeToCSV function nolonger accepts a parm.



see code below:



dhtmlXGridObject.prototype.serializeToCSV = function()
  {
   this.editStop()
   if (this._mathSerialization)
    this._agetm = “getMathValue”;
   else
    if (this._strictText)
     this._agetm = “getTitle”;
    else
     this._agetm = “getValue”;
   var out = [];
   if (this._csvHdr)
   {




---------------------------------------



How can I set “this._strictText” to be true so that it will use getTitle instead of getValue?



Thanks



 

You can set it directly as

grid._strictText = true;
var data = grid.serializeToCSV();

>>Since upgrading to dhtlmx 2008 Rel 3 of grid, the above workaround does not work any more as the serializeToCSV
Regression confirmed , functionality will be restored in next build.
(Please inform if you need such update ASAP)



That works



Thanks for the quick response!



I can wait the next build.