Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by askman on Jun 17, 2008 07:22
open dhtmlx forum
How to serialize selected rows in grid

Answer posted by support on Jun 17, 2008 07:28

There is no public method for this, but you can extend dhtmlXGridObject with the following method (place the code below dhtmlxgrid.js file on the page):

dhtmlXGridObject.prototype.serializeSelected = function(){
  var out = "";
  if (this._mathSerialization)
   this._agetm="getMathValue";
  else
   this._agetm="getValue";
  for(var i=0;i<this.selectedRows.length;i++){
   out+=this._serializeRow(this.selectedRows[i])+"</"+this.xml.s_row+">";
  }
  return "<rows>"+out+"</rows>";
 }