Next
Update
Prev
Change History
Change History (XML)
Save to Server
Reset Changes

You can submit the modified data to the server using the JavaScript function.

Double click on any cells and change the cell value and click on the button.

var gridApp, gridRoot, dataGrid, collection, column;

var xmlHttp;
function submitToServer() {
  dataGrid.setEnabled(false);	dataGrid.setEnabled(true);

  var serverUrl = "http://www.koolchart.com/koolgrid/server/gridUpdateData.php";
  var changedDataXML = gridRoot.getChangedDataXML();
  if (changedDataXML == null) {
    alert("No data has been changed.");
    return;
  }

  try {
    xmlHttp = new XMLHttpRequest();
  } catch(trymicrosoft) {
      try {
        xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
      } catch(othermicrosoft) {
        try {
          xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
        } catch(failed) {
            xmlHttp = false;
        }
      }
  }

  if (!xmlHttp) {
    alert("Error initializing XMLHttpRequest!");
    return;
  }

  xmlHttp.onreadystatechange = handleStateChange;
  xmlHttp.open("POST", serverUrl, true);
  xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8");
  xmlHttp.send("changedDataXML="+encodeURIComponent("<changedData>"+changedDataXML+"</changedData>"));
}


function resetChangedData() {
  gridRoot.resetChangedData();
}

© 2017 KoolChart. All rights reserved.