Build a Grid (Table) from CSV data file : Table Grid : GUI Components : JavaScript DHTML examples (example source code) Organized by topic

JavaScript DHTML
C++
JavaScript DHTML Home »  GUI Components   » [  Table Grid  ]   
 



Build a Grid (Table) from CSV data file

Please note that some example is only working under IE or Firefox.

 
<html>
<head>
  <title>ActiveWidgets Grid :: Examples</title>
  <style> body, html {margin:0px; padding: 0px; overflow: hidden;</style>

  <!-- ActiveWidgets stylesheet and scripts -->
  <link href="gridRuntime/styles/classic/grid.css" rel="stylesheet" type="text/css" ></link>
  <script src="gridRuntime/lib/grid.js"></script>

  <!-- grid format -->
  <style>
    .active-controls-grid {height: 100%; font: menu;}

    .active-column-{width:  80px;}
    .active-column-{width: 200px; background-color: threedlightshadow;}
    .active-column-{text-align: right;}
    .active-column-{text-align: right;}
    .active-column-{text-align: right;}

    .active-grid-column {border-right: 1px solid threedshadow;}
    .active-grid-row {border-bottom: 1px solid threedlightshadow;}
  </style>
</head>
<body>
  <script>

  //  create ActiveWidgets data model - text-based table
  var table = new Active.Text.Table;

  //  provide data URL - plain text comma-separated file
  table.setURL("gridExamples/data/companies.csv");

  //  start asyncronous data retrieval
  table.request();

  //  define column labels
  var columns = ["Ticker""Company Name""Market Cap.""$ Sales""Employees"];

  //  create ActiveWidgets Grid javascript object
  var obj = new Active.Controls.Grid;

  //  provide column labels
  obj.setColumnProperty("texts", columns);

  //  provide external model as a grid data source
  obj.setDataModel(table);

  //  write grid html to the page
  document.write(obj);

  </script>
</body>
</html>
           
       
Download: ActiveWidgets.zip   ( 344  K )  
Related examples in the same category
1.  List box ( Grid Table )Has Download File
2.  List view (Selection between two list)Has Download File
3.  Basic Grid (Table) Has Download File
4.  Grid (Table) with colored cellsHas Download File
5.  Build a Grid (Tree) from a tab separated fileHas Download File
6.  Build a Grid (Table) from yahoo quotes (IE only)Has Download File
7.  Grid (Table) with image in cellsHas Download File
8.  Grid (Table) with multiple selectionHas Download File
9.  Grid (Table) with row header and tooltipsHas Download File
10.  One page two grid (Table)Has Download File
11.  Data in Grid (Table) from XML fileHas Download File
12.  Grid (Table) with Data Island and Column highlightHas Download File
13.  Grid (Table) with cell format and XML data setHas Download File
14.  Grid (Table) data from RSS (IE only)Has Download File
15.  Grid (Table) data from xml file 2Has Download File
16.  Grid (Table) with news feeder (IE only)Has Download File
17.  Grid (Table) with quotes feeder (IE only)Has Download File
18.  Grid (Table) in Unix style
19.  Sortable Grids (table)
20.  Selectable Cells Grid Table
21.  Editable Grid Table cell
22.  Call back action in Grid Table
23.  Table Grid Rows Selection
24.  Grid Table Columns Resize
25.  Table Grid Column Renderers
26.  Sorting for each column or double click to edit its contents.
27.  Table Grid style and sort the style
28.  Table in JavaScriptHas Download File
29.  Web Data Grid TableHas Download File








Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.