1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
\r
4 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
\r
5 <title>Rico LiveGrid sourced from HTML table</title>
\r
8 require "LoadRicoClient.php";
\r
10 <link href="../demo.css" type="text/css" rel="stylesheet" />
\r
12 <script type='text/javascript'>
\r
13 Rico.loadModule('LiveGridBasic','LiveGridMenu');
\r
15 Rico.onLoad( function() {
\r
16 //alert('We are stopping here, at the start of the onLoad event, to show you that the grid is populated with data from a regular HTML table. This is what browsers with javascript disabled would display.');
\r
18 menuEvent : 'click',
\r
20 highlightElem: 'cursorRow',
\r
22 useUnformattedColWidth: false,
\r
23 columnSpecs : [{width:200},'specQty','specQty','specQty','specQty','specQty']
\r
25 var ex1=new Rico.LiveGrid ('population', new Rico.Buffer.Base(document.getElementById('population').tBodies[0]), opts);
\r
26 ex1.menu=new Rico.GridMenu({});
\r
34 <table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>
\r
36 <script type='text/javascript'>
\r
37 document.write(Rico.Lib+' '+Rico.LibVersion);
\r
40 This example demonstrates how Rico can convert an existing HTML table into
\r
41 a much more usable LiveGrid.
\r
42 LiveGrid provides scrolling, column resizing, filtering, and sorting capabilities.
\r
43 Click on a cell to see available actions.
\r
44 <p style='font-size:smaller;'>Data source: <a href="http://www.un.org/esa/population/unpop.htm">Population Division of the
\r
45 Department of Economic and Social Affairs of the United Nations Secretariat</a> (2009).
\r
46 <em>World Population Prospects: The 2008 Revision. Highlights.</em> New York: United Nations. </p>
\r
55 <p class="ricoBookmark"><span id="population_bookmark"> </span></p>
\r
56 <table class="ricoLiveGrid" id="population">
\r
59 <td class='ricoFrozen'></td>
\r
60 <td colspan=5>Population (thousands)</td>
\r
63 <td class='ricoFrozen'>Country or area</td>
\r
73 <td>Afghanistan</td>
\r
97 <td>American Samoa</td>
\r
129 <td>Antigua and Barbuda</td>
\r
177 <td>Azerbaijan</td>
\r
201 <td>Bangladesh</td>
\r
273 <td>Bosnia and Herzegovina</td>
\r
297 <td>British Virgin Islands</td>
\r
305 <td>Brunei Darussalam</td>
\r
321 <td>Burkina Faso</td>
\r
361 <td>Cape Verde</td>
\r
369 <td>Cayman Islands</td>
\r
377 <td>Central African Republic</td>
\r
393 <td>Channel Islands</td>
\r
417 <td>China, Hong Kong SAR</td>
\r
425 <td>China, Macao SAR</td>
\r
457 <td>Cook Islands</td>
\r
465 <td>Costa Rica</td>
\r
473 <td>Côte d'Ivoire</td>
\r
505 <td>Czech Republic</td>
\r
513 <td>Dem. People's Rep. of Korea</td>
\r
521 <td>Dem. Republic of the Congo</td>
\r
553 <td>Dominican Republic</td>
\r
577 <td>El Salvador</td>
\r
585 <td>Equatorial Guinea</td>
\r
617 <td>Faeroe Islands</td>
\r
625 <td>Falkland Islands (Malvinas)</td>
\r
657 <td>French Guiana</td>
\r
665 <td>French Polynesia</td>
\r
745 <td>Guadeloupe</td>
\r
777 <td>Guinea-Bissau</td>
\r
849 <td>Iran (Islamic Republic of)</td>
\r
873 <td>Isle of Man</td>
\r
921 <td>Kazakhstan</td>
\r
953 <td>Kyrgyzstan</td>
\r
961 <td>Lao People's Dem. Republic</td>
\r
1001 <td>Libyan Arab Jamahiriya</td>
\r
1009 <td>Liechtenstein</td>
\r
1017 <td>Lithuania</td>
\r
1025 <td>Luxembourg</td>
\r
1033 <td>Madagascar</td>
\r
1081 <td>Marshall Islands</td>
\r
1089 <td>Martinique</td>
\r
1097 <td>Mauritania</td>
\r
1105 <td>Mauritius</td>
\r
1129 <td>Micronesia (Fed. States of)</td>
\r
1137 <td>Moldova (Republic of)</td>
\r
1161 <td>Montenegro</td>
\r
1169 <td>Montserrat</td>
\r
1185 <td>Mozambique</td>
\r
1225 <td>Netherlands</td>
\r
1233 <td>Netherlands Antilles</td>
\r
1241 <td>New Caledonia</td>
\r
1249 <td>New Zealand</td>
\r
1257 <td>Nicaragua</td>
\r
1289 <td>Northern Mariana Islands</td>
\r
1305 <td>Occupied Palestinian Territory</td>
\r
1345 <td>Papua New Guinea</td>
\r
1369 <td>Philippines</td>
\r
1401 <td>Puerto Rico</td>
\r
1417 <td>Republic of Korea</td>
\r
1441 <td>Russian Federation</td>
\r
1457 <td>Saint Helena</td>
\r
1465 <td>Saint Kitts and Nevis</td>
\r
1473 <td>Saint Lucia</td>
\r
1481 <td>Saint Pierre and Miquelon</td>
\r
1489 <td>St. Vincent and the Grenadines</td>
\r
1505 <td>San Marino</td>
\r
1513 <td>Sao Tome and Principe</td>
\r
1521 <td>Saudi Arabia</td>
\r
1545 <td>Seychelles</td>
\r
1553 <td>Sierra Leone</td>
\r
1561 <td>Singapore</td>
\r
1585 <td>Solomon Islands</td>
\r
1601 <td>South Africa</td>
\r
1617 <td>Sri Lanka</td>
\r
1641 <td>Swaziland</td>
\r
1657 <td>Switzerland</td>
\r
1665 <td>Syrian Arab Republic</td>
\r
1673 <td>Tajikistan</td>
\r
1681 <td>TFYR Macedonia</td>
\r
1697 <td>Timor-Leste</td>
\r
1729 <td>Trinidad and Tobago</td>
\r
1753 <td>Turkmenistan</td>
\r
1761 <td>Turks and Caicos Islands</td>
\r
1793 <td>United Arab Emirates</td>
\r
1801 <td>United Kingdom</td>
\r
1809 <td>United Republic of Tanzania</td>
\r
1817 <td>United States of America</td>
\r
1825 <td>United States Virgin Islands</td>
\r
1841 <td>Uzbekistan</td>
\r
1857 <td>Venezuela (Bolivarian Republic of)</td>
\r
1873 <td>Wallis and Futuna Islands</td>
\r
1881 <td>Western Sahara</td>
\r