Next
Update
Prev

KoolGrid uses XML, JSON, CSV, TSV formatted Dataset to represent a Grid, and gets the Dataset information from a variable or an URL of the file. This sample Grid demonstrates how to represent a Grid by calling the setData() method to get the Dataset information (CSV) from a string variable.

var jsVars = "KoolOnLoadCallFunction=gridReadyHandler";
jsVars += "&dataType=csv";

function gridReadyHandler(id) {
  document.getElementById(id).setLayout(layoutStr);
  document.getElementById(id).setData(gridData);
}

var gridData = 'Amit,GMC-1 Release1,2006/12/07,2006/12/06,Jim,75126,1,1\n\
Amit,GMC-1 Release2,2006/12/07,2006/12/06,Jim,95822,1,2\n\
Amit,GMC-1 Release3,2006/12/11,2006/12/11,Jim,1862456,3,0\n\
Barb,GMC-1 Release3,2006/12/08,2006/12/08,Anant,65488,8,31\n\
Barb,GMC-1 Release4,2006/12/06,2006/12/06,Anant,4851568,8,1\n\
Harry,GMC-1 Release2,2006/11/28,2006/11/28,Ram,13548,1,0\n\
Harry,GMC-1 Release3,2006/12/08,2006/12/08,Ram,1235,1,12\n\
John,GMC-1 Release2,2006/12/07,2006/12/07,Jim,84621877,5,20\n\
John,GMC-1 Release3,2006/12/07,2006/12/06,Jim,51846,5,3\n\
Phill,GMC-1 Release1,2006/12/08,2006/12/08,Jim,31680,3,5\n\
Phill,GMC-1 Release1,2006/12/08,2006/12/08,Jim,1813,2,0\n\
Phill,GMC-1 Release3,2006/12/08,2006/12/08,Jim,13548,2,1\n\
Phill,GMC-1 Release4,2006/12/08,2006/12/08,Jim,16588,1,0\n\
James,GMC-1 Release4,2006/11/21,2006/11/21,Michael,5158,9,0\n\
James,GMC-1 Release5,2006/11/19,2006/11/19,William,216815,8,2\n\
James,GMC-1 Release6,2006/11/22,2006/11/20,David,312566,7,3';

© 2017 KoolChart. All rights reserved.