Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by guofang li on Oct 14, 2009 09:33
open dhtmlx forum
the method of getValue can get all data type values except dhxCalendar type.........

thanks for you answer, but I don't know why I can't get the dhxCalendar type value

this is my method :

getGridData: function(){
 var allItemID = new Array(0);  
 var modiItemID = new Array(0);// copy of allitemid
 var a = 0; // modiItemID array index
 var iflag = 0; //

 var saveFlag = false;
 var blankFlag = false;
 var gridColumns = this.getColumnCount();
 var dataXML = null;

 allItemID = this.getAllItemIds().split(",");

 // rows
 for (var i = 0; i < allItemID.length; i++) {
  var modiFlag = false;
  // columns
  for(var j = 0; j < gridColumns; j++){
   if(this.cells(allItemID[i],j) != null) {
    if(this.cells(allItemID[i],j).wasChanged()){
     modiFlag = true;
    }

    var cellValue = this.cells(allItemID[i],j).getValue(); // the method of getValue can get all data type values except dhxCalendar type
    
    if (cellValue != "" && cellValue.length != 0 && cellValue != null) {
     iflag++;
    }
   }
  }

  if (iflag > 1) {
   modiItemID[a++] = allItemID[i];  
  } 
 }

 if(modiItemID.length > 0){
  dataXML = "<?xml version='1.0' encoding='UTF-8'?><data>";
  for(var i = 0; i < modiItemID.length; i++){
   if(modiItemID[i].length > 0){
    dataXML += "<row id='" + modiItemID[i] + "'>";
    for(var j = 0; j < gridColumns; j++){
     dataXML += "<cell>";
     var cellValue = this.cells(modiItemID[i],j).getValue();
     if(cellValue.indexOf("<") != -1){
      dataXML += cellValue.substring(cellValue.indexOf(">")+1, cellValue.indexOf("</"));
     } else {
      dataXML += cellValue;
     }
     dataXML += "</cell>";
    }
    dataXML += "</row>";
   }
  }
  dataXML += "</data>";
 }
 return dataXML;
}

Answer posted by dhxSupport on Oct 15, 2009 08:14
Please try to replace your dhtmlxgrid_excell_dhxcalendar.js file with file from attachment. 
Answer posted by ligf on Oct 17, 2009 09:02
thanks for you answer, but the attachment dont find dhtmlxgrid_excell_dhxcalendar.js ................
Answer posted by dhxSupport on Oct 19, 2009 01:58
Sorry for inconvenience. Right file is attached. 
Attachments (1)