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=utf-8">
5 <title>Rico LiveGrid</title>
\r
6 <link href="ricoDocs.css" rel="Stylesheet" type="text/css">
10 <h1>Creating a Rico LiveGrid</h1>
\r
12 <p><a href='LiveGrid_ja.html'><img src='images/japanese.gif' alt='View this page in Japanese'></a>
\r
13 <a href='LiveGrid_ja.html'>View this page in Japanese</a></p>
\r
15 <p>Rico LiveGrid displays data in a scrolling table, with the data buffered in a
\r
16 2-dimensional JavaScript array. As the user scrolls
\r
17 vertically through the grid, data is dynamically copied from the array onto the grid.
\r
18 The buffer can can be loaded from:
\r
20 <li><a href='#model1'>a javascript array</a>
\r
21 <li><a href='#model2'>an HTML table</a>
\r
22 <li><a href='#model3'>an XML file</a>
\r
23 <li><a href='#model4'>a SQL database query</a>
\r
24 <li><a href='#model5'>a custom javascript callback function</a>
\r
28 <h2><a name='model1'>Usage Model 1: Loading data from a javascript array</a></h2>
\r
30 <ul><li>Load the data to be displayed into a javascript array.
\r
33 [1,'Cell 1:2','Cell 1:3','Cell 1:4','Cell 1:5'],
\r
34 [2,'Cell 2:2','Cell 2:3','Cell 2:4','Cell 2:5'],
\r
35 [3,'Cell 3:2','Cell 3:3','Cell 3:4','Cell 3:5'],
\r
36 [4,'Cell 4:2','Cell 4:3','Cell 4:4','Cell 4:5']
\r
40 <li>Load the Rico javascript and css files necessary to display the grid.
\r
42 Rico.loadModule('LiveGrid','LiveGridMenu','greenHdg.css');
\r
46 <dd>This loads the Rico javascript and css files necessary to display a LiveGrid
\r
47 with a static buffer (no AJAX).
\r
49 <dd>This loads the default grid menu. This menu provides access to all of the LiveGrid capabilities.
\r
50 It adjusts the selections presented to the user based on the column selected
\r
51 and the type of buffer used.
\r
52 You can also choose to use the grid with no menu at all, or to create your own menu
\r
53 customized to the needs of your application.
\r
55 <dd>Rico comes with several sample grid styles: coffee-with-milk,
\r
56 grayedout, greenHdg, iegradient (Internet Explorer only), tanChisel, and warmfall.
\r
57 You may choose one of the included styles or create one of your own.
\r
60 <li>Load the array into a Rico Buffer object:
\r
62 var buffer=new Rico.Buffer.Base();
\r
63 buffer.loadRowsFromArray(myData);
\r
66 <li>Define the grid's options, including the grid headings:
\r
70 visibleRows : 'data',
\r
72 columnSpecs : [{Hdg:'Column 1',type:'number', ClassName:'alignright'},
\r
80 <li>Instantiate the LiveGrid, passing in the base id for the grid,
\r
81 the Rico.Buffer instance, and the grid options.
\r
83 var ex1=new Rico.LiveGrid ('ex1', buffer, opts);
\r
86 <li>To enable the default pop-up menu for the grid, assign the grid's
\r
87 menu property to an instance of Rico.GridMenu.
\r
89 ex1.menu=new Rico.GridMenu();
\r
92 <li>Rico.loadModule may finish <em>after</em> the window.onload event.
\r
93 So to ensure that the grid initialization runs after the Rico modules
\r
94 have loaded, you must pass the initialization function to the
\r
95 Rico.onLoad method. Putting all of the javascript together would look like this:
\r
97 <script type='text/javascript'>
\r
98 Rico.loadModule('LiveGrid','LiveGridMenu','greenHdg.css');
\r
100 Rico.onLoad( function() {
\r
102 [1,'Cell 1:2','Cell 1:3','Cell 1:4','Cell 1:5'],
\r
103 [2,'Cell 2:2','Cell 2:3','Cell 2:4','Cell 2:5'],
\r
104 [3,'Cell 3:2','Cell 3:3','Cell 3:4','Cell 3:5'],
\r
105 [4,'Cell 4:2','Cell 4:3','Cell 4:4','Cell 4:5']
\r
109 visibleRows : 'data',
\r
111 columnSpecs : [{Hdg:'Column 1',type:'number', ClassName:'alignright'},
\r
117 var buffer=new Rico.Buffer.Base();
\r
118 buffer.loadRowsFromArray(myData);
\r
119 var ex1=new Rico.LiveGrid ('ex1', buffer, opts);
\r
120 ex1.menu=new Rico.GridMenu();
\r
125 <li>Finally, place a div element in your HTML markup at the position where the grid should go.
\r
126 Including the markup for the bookmark will cause the grid's scroll position to be displayed.
\r
128 <p class="ricoBookmark"><span id="ex1_bookmark"> </span></p>
\r
129 <div id="ex1"></div>
\r
137 <h2><a name='model2'>Usage Model 2: Loading data from an HTML table</a></h2>
\r
139 <ul><li>Define an HTML table with the headings in a <code><thead></code> section
\r
140 and the data in a <code><tbody></code> section.
\r
141 Including the markup for the bookmark will cause the grid's scroll position to be displayed.
\r
143 <p class="ricoBookmark"><span id="data_grid_bookmark"> </span></p>
\r
144 <table id="data_grid">
\r
148 <th>First column name</th>
\r
149 <th>Second column name</th>
\r
151 <th>Last column name</th>
\r
159 <td>Row 1, column 1 data</td>
\r
160 <td>Row 1, column 2 data</td>
\r
162 <td>Row 1, last column data</td>
\r
166 <td>Row 2, column 1 data</td>
\r
167 <td>Row 2, column 2 data</td>
\r
169 <td>Row 2, last column data</td>
\r
175 <td>Row n, column 1 data</td>
\r
176 <td>Row n, column 2 data</td>
\r
178 <td>Row n, last column data</td>
\r
185 <li>Load the Rico javascript and css files necessary to display the grid.
\r
187 Rico.loadModule('LiveGrid','LiveGridMenu','greenHdg.css');
\r
191 <dd>This loads the Rico javascript and css files necessary to display a LiveGrid
\r
192 with a static buffer (no AJAX).
\r
194 <dd>This loads the default grid menu. This menu provides access to all of the LiveGrid capabilities.
\r
195 It adjusts the selections presented to the user based on the column selected
\r
196 and the type of buffer used.
\r
197 You can also choose to use the grid with no menu at all, or to create your own menu
\r
198 customized to the needs of your application.
\r
200 <dd>Rico comes with several sample grid styles: coffee-with-milk,
\r
201 grayedout, greenHdg, iegradient (Internet Explorer only), tanChisel, and warmfall.
\r
202 You may choose one of the included styles or create one of your own.
\r
205 <li>Load the table's data rows into a Rico Buffer object:
\r
207 var buffer = new Rico.Buffer.Base($('data_grid').tBodies[0]);
\r
210 <li>Finally, instantiate the LiveGrid, passing in the DOM id of the HTML table
\r
211 (this allows the LiveGrid to load the column headings from the table's thead section),
\r
212 the Rico.Buffer instance, and any options (in this case the first column gets
\r
213 a width of 50 pixels and the second column gets a width of 80 pixels).
\r
215 var grid_options = { columnSpecs: [ {width:50}, {width:80} ] };
\r
216 var grid = new Rico.LiveGrid('data_grid', buffer, grid_options);
\r
219 <li>Rico.loadModule may finish <em>after</em> the window.onload event.
\r
220 So to ensure that the grid initialization runs after the Rico modules
\r
221 have loaded, you must pass the initialization function to the
\r
222 Rico.onLoad method. Putting all of the javascript together would look like this:
\r
224 <script type='text/javascript'>
\r
225 Rico.loadModule('LiveGrid','LiveGridMenu','greenHdg.css');
\r
227 Rico.onLoad( function() {
\r
228 var buffer = new Rico.Buffer.Base($('data_grid').tBodies[0]);
\r
229 var grid_options = { columnSpecs: [width:50, width:80] };
\r
230 var grid = new Rico.LiveGrid('data_grid', buffer, grid_options);
\r
238 <h2><a name='model3'>Usage Model 3: Loading data from an XML file</a></h2>
\r
240 <ul><li>Define an HTML table, supplying the table header cells, but no table body cells.
\r
241 Including the markup for the bookmark will cause the grid's scroll position to be displayed.
\r
243 <p class="ricoBookmark"><span id="data_grid_bookmark"> </span></p>
\r
244 <table id="data_grid">
\r
247 <th>First column name</th>
\r
248 <th>Second column name</th>
\r
254 <li>Load the Rico javascript and css files necessary to display the grid.
\r
256 Rico.loadModule('LiveGridAjax','LiveGridMenu','greenHdg.css');
\r
260 <dd>This loads the Rico javascript and css files necessary to display a LiveGrid
\r
261 with an AJAX-enabled buffer.
\r
263 <dd>This loads the default grid menu. This menu provides access to all of the LiveGrid capabilities.
\r
264 It adjusts the selections presented to the user based on the column selected
\r
265 and the type of buffer used.
\r
266 You can also choose to use the grid with no menu at all, or to create your own menu
\r
267 customized to the needs of your application.
\r
269 <dd>Rico comes with several sample grid styles: coffee-with-milk,
\r
270 grayedout, greenHdg, iegradient (Internet Explorer only), tanChisel, and warmfall.
\r
271 You may choose one of the included styles or create one of your own.
\r
274 <li>Create a Rico Buffer, which fetches data to populate the table.
\r
275 The AjaxXML buffer makes just one request for data to the supplied URL
\r
278 var buffer = new Rico.Buffer.AjaxXML('/controller/action?format=xml');
\r
281 The URL ("/controller/action?format=xml" in this example) must return data in the following format:
\r
283 <ajax-response>
\r
284 <response type='object' id='data_grid_updater'>
\r
285 <rows update_ui='true' offset='0'>
\r
286 <tr><td>Data for row 1, cell 1</td><td>Data for row 1, cell 2</td></tr>
\r
287 <tr><td>Data for row 2, cell 1</td><td>Data for row 2, cell 2</td></tr>
\r
290 </ajax-response>
\r
293 <li>Finally, instantiate the LiveGrid, passing in the DOM id of the HTML table,
\r
294 the Rico.Buffer instance, and any options (columnSpecs is not required,
\r
295 but shown here as a placeholder for customization of the columns).
\r
297 var grid_options = { columnSpecs: [,] };
\r
298 var grid = new Rico.LiveGrid('data_grid', buffer, grid_options);
\r
301 <li>Rico.loadModule may finish <em>after</em> the window.onload event.
\r
302 So to ensure that the grid initialization runs after the Rico modules
\r
303 have loaded, you must pass the initialization function to the
\r
304 Rico.onLoad method. Putting all of the javascript together would look like this:
\r
306 <script type='text/javascript'>
\r
307 Rico.loadModule('LiveGridAjax','LiveGridMenu','greenHdg.css');
\r
309 Rico.onLoad( function() {
\r
310 var buffer = new Rico.Buffer.AjaxXML('/controller/action?format=xml');
\r
311 var grid_options = { columnSpecs: [,] };
\r
312 var grid = new Rico.LiveGrid('data_grid', buffer, grid_options);
\r
319 <h2><a name='model4'>Usage Model 4: Loading data from an SQL database query</a></h2>
\r
321 <p>The descriptions below apply directly to the ASP and PHP implementations of the Rico LiveGrid plug-ins.
\r
322 The concepts are the same in .net, but the implementation is quite different
\r
323 (examine ex2simple.aspx to see how this gets implemented in .net).
\r
326 <li>Define a session variable that contains the query to be run. The variable name must
\r
327 match the id of the table below. When requesting data, the grid will pass its id
\r
328 to ricoXMLquery, and ricoXMLquery will use it to get the query text from
\r
329 the session variable.
\r
334 session.contents("data_grid")="select ID,Name,City from customers"
\r
341 $_SESSION['data_grid']="select ID,Name,City from customers";
\r
347 Sub Page_Load(Sender As object, e As EventArgs)
\r
348 data_grid.sqlQuery="select ID,Name,City from customers"
\r
349 ' session variable is set by the control
\r
355 <li>Define an HTML table, supplying the table header cells, but no table body cells.
\r
356 Including the markup for the bookmark will cause the grid's scroll position to be displayed.
\r
358 <p class="ricoBookmark"><span id="data_grid_bookmark"> </span></p>
\r
359 <table id="data_grid">
\r
362 <th>Customer #</th>
\r
363 <th>Customer Name</th>
\r
364 <th>City</th>
\r
370 <li>Load the Rico javascript and css files necessary to display the grid.
\r
372 Rico.loadModule('LiveGridAjax','LiveGridMenu','greenHdg.css');
\r
376 <dd>This loads the Rico javascript and css files necessary to display a LiveGrid
\r
377 with an AJAX-enabled buffer.
\r
379 <dd>This loads the default grid menu. This menu provides access to all of the LiveGrid capabilities.
\r
380 It adjusts the selections presented to the user based on the column selected
\r
381 and the type of buffer used.
\r
382 You can also choose to use the grid with no menu at all, or to create your own menu
\r
383 customized to the needs of your application.
\r
385 <dd>Rico comes with several sample grid styles: coffee-with-milk,
\r
386 grayedout, greenHdg, iegradient (Internet Explorer only), tanChisel, and warmfall.
\r
387 You may choose one of the included styles or create one of your own.
\r
390 <li>Create a Rico Buffer, which fetches data to populate the table.
\r
391 Unlike the AjaxXML buffer which fetches all grid data at once, the AjaxSQL
\r
392 buffer fetches data in chunks. This makes it possible for LiveGrid to
\r
393 efficiently display query results containing thousands, or even hundreds of thousands
\r
396 var buffer = new Rico.Buffer.AjaxSQL('ricoXMLquery.asp');
\r
399 The URL ("ricoXMLquery.asp" in this example) utilizes one of the included plug-ins to
\r
400 fetch data from the database and return it to the grid in this XML format:
\r
402 <ajax-response>
\r
403 <response type='object' id='data_grid_updater'>
\r
404 <rows update_ui='true' offset='0'>
\r
405 <tr><td>Data for row 1, cell 1</td><td>Data for row 1, cell 2</td></tr>
\r
406 <tr><td>Data for row 2, cell 1</td><td>Data for row 2, cell 2</td></tr>
\r
408 <rowcount>99</rowcount>
\r
410 </ajax-response>
\r
413 The <rowcount> tag is optional, but should be returned whenever the "get_total"
\r
414 querystring parameter is present in the request.
\r
416 <li>Finally, instantiate the LiveGrid, passing in the DOM id of the HTML table,
\r
417 the Rico.Buffer instance, and any options (columnSpecs is not required,
\r
418 but shown here as a placeholder for customization of the columns).
\r
420 var grid_options = { columnSpecs: [,,] };
\r
421 var grid = new Rico.LiveGrid('data_grid', buffer, grid_options);
\r
424 <li>Rico.loadModule may finish <em>after</em> the window.onload event.
\r
425 So to ensure that the grid initialization runs after the Rico modules
\r
426 have loaded, you must pass the initialization function to the
\r
427 Rico.onLoad method. Putting all of the javascript together would look like this:
\r
429 <script type='text/javascript'>
\r
430 Rico.loadModule('LiveGridAjax','LiveGridMenu','greenHdg.css');
\r
432 Rico.onLoad( function() {
\r
433 var buffer = new Rico.Buffer.AjaxSQL('ricoXMLquery.asp');
\r
434 var grid_options = { columnSpecs: [,,] };
\r
435 var grid = new Rico.LiveGrid('data_grid', buffer, grid_options);
\r
442 <h2><a name='model5'>Usage Model 5: Loading data using a custom callback function</a></h2>
\r
444 <p>This model works the same way as models 3 and 4 except that, rather than fetching
\r
445 data using an xmlHTTPrequest, the data is fetched using javascript callback functions.
\r
446 This allows you to do creative things in the callback function - like call Google Gears.
\r
447 Setting up the callback is very easy. Rather than passing a string containing the data provider's URL
\r
448 to the AjaxXML or AjaxSQL constructor, you just pass the callback function instead.
\r
450 <p>The code that follows is taken from
\r
451 <a href='client/gridJSbuffer.html'>examples/client/gridJSbuffer.html</a>,
\r
452 which uses the AjaxXML buffer. The "jsfetch" callback function
\r
453 returns a 2-dimensional array that is 100 rows long by 5 columns wide.
\r
454 Note that AjaxXML only loads its buffer once (at grid startup), so
\r
455 jsfetch will only be called once.
\r
456 The options hash is identical in structure to the options hash used
\r
457 by Prototype's <a href='http://prototypejs.org/api/ajax/options'>Ajax.Request</a> method.
\r
460 buffer=new Rico.Buffer.AjaxXML(<strong>jsfetch</strong>);
\r
462 function <strong>jsfetch</strong>(options) {
\r
463 Rico.writeDebugMsg("jsfetch");
\r
464 var newRows=[], offset=options.parameters.offset;
\r
465 for (var r=0; r<100; r++) {
\r
467 row.push(offset.toString());
\r
468 row.push(new Date().toString());
\r
469 for (var c=2; c<5; c++) row.push('cell '+r+':'+c);
\r
472 options.onComplete(newRows);
476 <p>The code that follows is taken from
\r
477 <a href='client/gridJSbuffer2.html'>examples/client/gridJSbuffer2.html</a>,
\r
478 which uses the AjaxSQL buffer. The "jsfetch" callback function
\r
479 simulates a 2-dimensional array that is 500 rows long by 5 columns wide.
\r
480 However, only a section of that array is returned during any one callback --
\r
481 just the rows from <code>options.parameters.offset</code> to
\r
482 <code>options.parameters.offset + options.parameters.page_size</code>.
\r
485 buffer=new Rico.Buffer.AjaxSQL(<strong>jsfetch</strong>);
\r
487 function <strong>jsfetch</strong>(options) {
\r
488 var newRows=[], totrows=500;
\r
489 var offset=options.parameters.offset;
\r
490 var limit=Math.min(totrows-offset,options.parameters.page_size)
\r
491 for (var r=0; r<limit; r++) {
\r
493 row.push(new Date().toString());
\r
494 row.push(offset.toString());
\r
495 for (var c=2; c<5; c++) row.push('cell '+(r+offset)+':'+c);
\r
498 options.onComplete(newRows,false,totrows);
502 <p>options.onComplete takes the following parameters:
\r
504 <li>newRows - 2-dimensional array where each item is a string
\r
505 <li>newAttr - 2-dimensional array where each item is an object containing acceptAttr values for the cell,
\r
506 or false if acceptAttr is not being used
\r
507 <li>totalRows - an integer representing the total number of rows in the dataset
\r
508 <li>errMsg - if an error occurs, this is the message text to be displayed to the user
\r
512 <h2><a name='debug'></a>Debugging</h2>
\r
513 <p>Rico 2.0 includes the ability to route time-stamped debug messages to a message log.
\r
514 The log may be an html textarea or the browser's javascript console.
\r
516 <li>If a textarea exists with the id of the LiveGrid table plus '_debugmsgs', i.e.
\r
517 <pre style='margin:3px;'><textarea cols="100" rows="5" id="data_grid_debugmsgs" /></pre>
\r
518 then this textarea will be used for the message log.
\r
519 <li>Alternatively, the textarea may be designated by a call to Rico.setDebugArea()
\r
522 <textarea id='debug' rows='5' cols='80'></textarea>
\r
523 <script type='text/javascript'>
\r
524 Rico.setDebugArea('debug');
\r
528 <li>If no textarea is designated, Rico will attempt to use the browser's
\r
529 built-in javascript console. The following consoles are known to work:
\r
531 <li>The console in Firefox's <a href='http://www.getfirebug.com/'>Firebug</a> add-on
\r
532 <li>The Opera javascript console
\r
533 <li>The Safari javascript console
\r
534 <li>The console in <a href='http://blogs.msdn.com/ie/archive/2008/09/03/developer-tools-in-internet-explorer-8-beta-2.aspx'>IE8's Developer Toolbar</a> (under the Script tab)
\r
538 <p>LiveGrid is programmed to send a number of messages to the message log that may prove helpful in debugging.
\r
539 You can also send your own messages by using Rico.writeDebugMsg(). For example:
\r
541 Rico.writeDebugMsg('My debug message');
\r
544 <h2>Grid Menus</h2>
\r
546 <p>Rico LiveGrids come with a lot of functionality built in. To access that functionality,
\r
547 Rico includes a default set of menus -- defined in ricoLiveGridMenu.js.
\r
548 To use the default menu, simply load the 'LiveGridMenu' module and then
\r
549 assign the grid's menu property to an instance of the Rico.GridMenu class.
\r
551 Rico.loadModule('LiveGridMenu');
\r
553 var ex1=new Rico.LiveGrid ('ex1', buffer, grid_options);
\r
554 ex1.menu=new Rico.GridMenu();
\r
556 <p>By default, the menu will open when a user double-clicks on a grid cell.
\r
557 To change the event that opens the menu, assign a value to the grid's
\r
558 <a href='#menuEvent'>menuEvent</a> option. The following code will open the menu on a right-click:
\r
560 Rico.loadModule('LiveGridMenu');
\r
562 var grid_options = {
\r
563 menuEvent: 'contextmenu'
\r
565 var ex1=new Rico.LiveGrid ('ex1', buffer, grid_options);
\r
566 ex1.menu=new Rico.GridMenu();
\r
568 <p>Rico.GridMenu provides a callback (dataMenuHandler) so that additional menu items can be added.
\r
569 The grid menu is always built dynamically -- customized to the row and column the user
\r
570 has clicked on. So the callback function is called every time the menu is invoked and
\r
571 must add the desired menu items at each invocation.
\r
573 Rico.loadModule('LiveGridMenu');
\r
575 var ex1=new Rico.LiveGrid ('ex1', buffer, grid_options);
\r
576 ex1.menu=new Rico.GridMenu();
\r
577 ex1.menu.options.dataMenuHandler=myCustomMenuItems;
\r
579 function myCustomMenuItems(grid,r,c,onBlankRow) {
\r
580 if (buffer.getWindowValue(r,c)=='Special Value')
\r
581 grid.menu.addMenuItem("Special menu item", specialAction);
583 function specialAction() {
\r
588 <p>It is also possible to create completely custom menus. For an example,
\r
589 see ex5.php/asp/aspx.
\r
595 <li>If you create an element with a DOM id matching the name of the LiveGrid table
\r
596 plus '_bookmark', it will be updated with text indicating
\r
597 the number of records displayed in the grid. The LiveGrid examples typically use
\r
600 <p class="ricoBookmark"><span id="data_grid_bookmark"> </span></p>
\r
602 <li>In order to display properly, a browser displaying a LiveGrid must be operating in
\r
603 <a href="http://www.quirksmode.org/css/quirksmode.html">strict (aka standards) mode</a>.
\r
604 Therefore, you must include a doctype declaration just before the
\r
605 <code> <html> </code> tag. For example:
\r
607 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
\r
608 "http://www.w3.org/TR/html4/strict.dtd">
\r
615 <h3>Constructor</h3>
\r
618 var grid = new Rico.LiveGrid (table_id, rico_buffer, grid_options);
\r
623 <li><strong>table_id</strong> is the DOM id of the table (or div) that will be replaced by a LiveGrid
\r
624 <li><strong>rico_buffer</strong> is a Rico Buffer object, e.g.
\r
626 <li>Rico.Buffer.Base (for non-AJAX tables)
\r
627 <li>Rico.Buffer.AjaxXML
\r
628 <li>Rico.Buffer.AjaxSQL
\r
629 <li>Rico.Buffer.AjaxJSON
\r
631 <li><strong>grid_options</strong> (see below)
\r
634 <h3><a name="options"></a>Options</h3>
\r
639 <dt>visibleRows (rows in .net plug-in)
\r
640 <dd>How many rows of the grid are made visible?
\r
641 A positive integer specifies that the grid should always contain exactly that many rows.
\r
642 <p>Negative values have the following meanings:
\r
644 <li>-1: size grid to client window (default)
\r
645 <li>-2: size grid to whichever is smaller: the client window or the data
\r
646 <li>-3: size grid so that the page body does not have a scrollbar
\r
647 <li>-4: size grid to the parent node in the DOM
\r
649 <p>String values have the following meanings:
\r
651 <li>'window': size grid to client window (default)
\r
652 <li>'data': size grid to whichever is smaller: the client window or the data
\r
653 <li>'body': size grid so that the page body does not have a scrollbar
\r
654 <li>'parent': size grid to the parent node in the DOM
\r
655 <li>'XX%': size grid to XX percent of the total window height
\r
656 <li>'XXpx': size grid to XX pixels
\r
660 <dd>Minimum # of visible rows. Used only when visibleRows < 0. (default: 2 - after Rico 2b3, 1 - up to Rico 2b3)
\r
663 <dd>Maximum # of visible rows. Used only when visibleRows < 0. (default: 50)
\r
665 <dt><a name="defaultWidth"></a>defaultWidth
\r
666 <dd>An integer used in setting the initial width of columns.
\r
667 See the <a href='#width'>column width option</a> for an explanation.
\r
668 (default: -1 if initializing from an HTML table, 100 otherwise)
\r
671 <dd>For some calculations, LiveGrid needs to know the width of scrollbars on the page. (default: 19)
\r
674 <dd>Minimum scroll area width in pixels when width of frozen columns exceeds window width. (default: 100)
\r
680 <dt>offset<dd>First row of data to be displayed (default: 0)
\r
681 <dt>prefetchBuffer<dd>Load the buffer (and therefore the grid) on page load? (default: true)
\r
682 <dt>sortCol<dd>Name or index of column for initial sort
\r
683 <dt>sortDir<dd>Direction of initial sort
\r
684 <br>possible values: 'ASC', 'DESC'
\r
685 <dt>getQueryParms<dd>If true, check the web page's query string for filter parameters and apply
\r
686 any filter that is found. Filter parameters must be of the form "f[x]=" where x is the column index.
\r
690 <h4>Header Configuration</h4>
\r
693 <dd>number of columns on the left side of the grid that should be
\r
694 frozen (like Excel).
\r
697 <dd>A string that defines how headings are displayed to facilitate sorting.
\r
699 <li>'link' -- make headings a link that will sort columns (default)
\r
700 <li>'hover' -- user can click in any part of the heading cell to sort.
\r
701 Heading changes background color when cursor hovers over cell.
\r
702 <li>'none' -- events on headings are disabled
\r
706 <dd>Put sort and filter icons before or after header text (default: true)
\r
708 <dt><a name='allowColResize'>allowColResize</a>
\r
709 <dd>Allow columns to be resized by the user? If true, then resizing for individual columns
\r
710 can be disabled using <a href='#noResize'>noResize</a> in columnSpecs[].
\r
713 <dd>An array of strings that can serve as secondary headings.
\r
714 In LiveGrid Forms, they also serve as the headings for the tabbed panels on the input form.
\r
716 <dt>PanelNamesOnTabHdr
\r
717 <dd>Set to 'true' for the strings in panels[] to be used as secondary headings.
\r
718 In LiveGrid Forms, it may be set to 'false' so that panels[] is only used on the input form.
\r
720 <dt><a name='FilterLocation'>FilterLocation</a>
\r
721 <dd>Specifies the heading row where filters should be placed.
\r
722 -1 causes a new row to be appended to the header and that new row used for filtering.
\r
723 See also the <a href='#filterUI'>filterUI</a> option.
\r
726 <dd>Token in select filters used to indicate "show all values" (default: "___ALL___").
\r
731 <dt>resizeBackground
\r
732 <dd>Image to use for column resize handle. (default: 'resize.gif')
\r
735 <dd>Image to use to indicate that the column is sorted in ascending order. (default: 'sort_asc.gif')
\r
738 <dd>Image to use to indicate that the column is sorted in descending order. (default: 'sort_desc.gif')
\r
741 <dd>Image used to indicate an active filter on a column. (default: 'filtercol.gif')
\r
745 <h4>Cookie options</h4>
\r
748 <dt><a name='saveColumnInfo'>saveColumnInfo</a>
\r
749 <dd>Specifies which details to save in the grid's cookie. Only one cookie is used for each grid.
\r
750 Note that the width setting includes the hide/show status of the column.
\r
751 (default: {width:true, filter:false, sort:false})
\r
752 <br>In the .net plug-in, this option is represented by 3 separate properties:
\r
753 saveColumnWidth, saveColumnFilter, saveColumnSort
\r
756 <dd>A string that is prepended to the cookie name. (default: 'RicoGrid.')
\r
759 <dd>Number of days before the cookie expires.
\r
760 If you don't specify it, then the cookie is only maintained for the current session. (default: null)
\r
763 <dd>Sets the top level directory from which the grid cookie can be read.
\r
764 If you don't specify it, it becomes the path of the page that sets the cookie. (default: null)
\r
767 <dd>Tells the browser to which domain the cookie should be sent.
\r
768 If you don't specify it, it becomes the domain of the page that sets the cookie. (default: null)
\r
772 <h4>Highlighting and selection</h4>
\r
776 <dd>a string that specifies what gets highlighted/selected
\r
778 <li>'cursorRow' -- the grid row under the cursor
\r
779 <li>'cursorCell' -- the grid cell under the cursor
\r
780 <li>'menuRow' -- the grid row where the menu is displayed
\r
781 <li>'menuCell' -- the grid cell where the menu is displayed
\r
782 <li>'selection' -- allow the user to select cells
\r
783 <li>'none' -- never highlight
\r
786 <dt>highlightSection
\r
787 <dd>an integer that specifies which section of the table is highlighted
\r
791 <li>3 -- all (default)
\r
795 <dt>highlightMethod
\r
796 <dd>Method used to highlight cells & rows. Possible values:
\r
798 <li>'outline' -- least CPU-intensive on client-side
\r
799 <li>'class' -- adds CSS class to highlighted cell/row (default)
\r
800 <li>'both' -- highlight using both outline and class
\r
804 <dd>When highlighting by class, this is the class name used (default: 'ricoLG_selection')
\r
808 <h4>Export and print</h4>
\r
812 <dd>The maximum number of rows that the user is allowed
\r
813 to Print/Export. Set to 0 to disable print/export. (default: 1000)
\r
816 <dd>Options string passed to <a href='http://www.w3schools.com/htmldom/met_win_open.asp'>window.open()</a>
\r
817 when the export window is created. (default: "height=400,width=500,scrollbars=1,menubar=1,resizable=1")
\r
819 <dt>exportStyleList
\r
820 <dd>An array of CSS attributes that will be extracted from the first visible row of the grid and used
\r
821 to format all rows of the exported table.
\r
822 (default: ['background-color', 'color', 'text-align', 'font-weight', 'font-size', 'font-family'])
\r
826 <h4>Behavior Defaults</h4>
\r
828 <dt><a name='canHideDefault'>canHideDefault</a>
\r
829 <dd>Controls whether columns can be hidden/shown (default: true).
\r
830 Hide/show can be disabled for individual columns using the <a href='#canHide'>canHide</a> property in columnSpecs.
\r
832 <dt><a name='canSortDefault'>canSortDefault</a>
\r
833 <dd>Controls whether columns can be sorted (default: true).
\r
834 Sorting can be disabled for individual columns using the <a href='#canSort'>canSort</a> property in columnSpecs.
\r
836 <dt><a name='canFilterDefault'>canFilterDefault</a>
\r
837 <dd>Controls whether columns can be filtered (default: true).
\r
838 Filtering can be disabled for individual columns using the <a href='#canFilter'>canFilter</a> property in columnSpecs.
\r
840 <dt><a name='dndMgrIdx'>dndMgrIdx</a>
\r
841 <dd>Specifies which drag-and-drop management zone should be used for drag operations (default: 0).
\r
842 This only needs to be specified if the web page uses multiple distinct zones.
\r
847 <h4>Event control</h4>
\r
849 <dt><a name='menuEvent'>menuEvent</a>
\r
850 <dd>A string that specifies when the grid's menu should be invoked
\r
852 <li>'click' -- invoke menu on single-click
\r
853 <li>'dblclick' -- invoke menu on double-click (default)
\r
854 <li>'contextmenu' -- invoke menu on right-click
\r
855 <li>'none' -- no pop-up menu
\r
859 <dd>A boolean value specifying whether to resize the grid during a window.resize event.
\r
860 This should be set to false when the grid is embedded in an accordian. (default: true)
\r
864 <h4>Event handles</h4>
\r
866 <dt style='font-weight:normal;'>Event handlers cannot be passed in options to the constructor, but may be set after the LiveGrid has been constructed.
\r
867 <dt>sortHandler<dd> (default: Rico.LiveGridMethods.sortHandler -- bound)
\r
868 <dt>filterHandler<dd> (default: Rico.LiveGridMethods.filterHandler -- bound)
\r
869 <dt>onRefreshComplete<dd> (default: Rico.LiveGridMethods.bookmarkHandler -- bound)
\r
870 <dt>rowOverHandler<dd> (default: Rico.LiveGridMethods.rowMouseOver -- bound as event listener)
\r
871 <dt>mouseDownHandler<dd> (default: Rico.LiveGridMethods.selectMouseDown -- bound as event listener)
\r
872 <dt>mouseOverHandler<dd> (default: Rico.LiveGridMethods.selectMouseOver -- bound as event listener)
\r
873 <dt>mouseUpHandler<dd> (default: Rico.LiveGridMethods.selectMouseUp -- bound as event listener)
\r
874 <dt>onscroll<dd> called whenever the grid is scrolled vertically. (default: null)
\r
875 <dt>onscrollidle<dd> called 1.2 seconds after the grid is scrolled vertically. (default: null)
\r
876 <dt>click<dd> called when a grid cell is clicked. (default: null, unless menuEvent='click')
\r
877 <dt>dblclick<dd> called when a grid cell is double-clicked. (default: null, unless menuEvent='dblclick')
\r
878 <dt>contextmenu<dd> called when a grid cell is right-clicked. (default: null, unless menuEvent='contextmenu')
\r
881 <h4><a name="column"></a>Per-column configuration</h4>
\r
883 <dt style='font-weight:normal;'>Options for each individual column are contained in the columnSpecs option.
\r
884 columnSpecs is an array with an entry for each column.
\r
885 Each column entry can either be:
\r
888 <li>null (default) -- in which case the column is formatted according to the spec in Rico.TableColumn.DEFAULT.
\r
889 If most columns in your grid share common formatting, then it may make sense to override
\r
890 the default column spec for that grid:
\r
892 Rico.TableColumn.DEFAULT = {ClassName:'aligncenter', width:50};
\r
894 In this case, any column with no spec will have content aligned to the center and a width of 50 pixels.
\r
896 <li>a string -- provides a simple way to specify a column format.
\r
897 These values are built-in: DOLLAR, EURO, PERCENT, QTY, DEFAULT.
\r
898 It is also possible to define your own. This example, which defines a temperature format,
\r
899 is taken from weather.php:
\r
901 Rico.TableColumn.TEMP = {type:'number', decPlaces:0,
\r
902 ClassName:'alignright', suffix:'&deg;C', width:50};
\r
905 columnSpecs : [{width:120},{width:70},{width:70},{width:100},
\r
906 'TEMP','TEMP','TEMP',
\r
907 {width:150},{width:200},{width:60}]
\r
911 <li>an object -- containing entries for one or more of the properties listed below.
\r
912 Here is an example that contains specifications for columns 0, 1, and 3.
\r
913 Column 2 would get the default spec.
\r
915 columnSpecs : [{canSort:false, noResize:true, ClassName:'alignright'},
\r
916 {ClassName:'aligncenter'},
\r
923 <dd>An alternate way of specifying the heading text for a column.
\r
924 Only used by LiveGrid if the grid id refers to a <div> instead of an html table.
\r
926 <dt><a name='canSort'>canSort</a>
\r
927 <dd>Column can be sorted. (default: <a href='#canSortDefault'>grid.options.canSortDefault</a>)
\r
929 <dt><a name='canFilter'>canFilter</a>
\r
930 <dd>Column can be filtered. (default: <a href='#canFilterDefault'>grid.options.canFilterDefault</a>)
\r
933 <dd>Column cells can serve as the source for a drag-n-drop operation. The "DragAndDrop" module must be loaded.
\r
934 The temporary drag objects have a class of "LiveGridDraggable".
\r
935 For an example, see <a href='client/drag_and_drop_grid.html'>drag_and_drop_grid.html</a>. (default: false)
\r
937 <dt><a name='canHide'>canHide</a>
\r
938 <dd>Column can be hidden/unhidden. (default: <a href='#canHideDefault'>grid.options.canHideDefault</a>)
\r
941 <dd>Controls whether the column is visible at grid startup (default: true).
\r
942 If <a href='#saveColumnInfo'>grid.options.saveColumnInfo.width</a> is true
\r
943 and there is a value in the cookie for this column, the cookie value will take precedence.
\r
945 <dt><a name='width'>width</a>
\r
946 <dd>An integer specifying the initial width (in pixels) for the column.
\r
947 Here is the algorithm LiveGrid uses for setting the initial width of each column:
\r
949 <li>If <a href='#saveColumnInfo'>options.saveColumnInfo.width</a> is true and column information is present in the grid's cookie
\r
950 (due to the user previously performing a resize on that grid's column),
\r
951 then the width in the cookie is used. Otherwise...
\r
953 <li>If there is a width spec for the column in options.columnSpecs[], then the width in the spec is used. For an example, see ex3.php/asp/aspx. Otherwise...
\r
955 <li>If <a href='#defaultWidth'>options.defaultWidth</a> is true (default) and the grid header is initialized from an html table, then the column's width in the html table is used.
\r
956 You can usually control the column widths of the initial table by using col tags (e.g. <col style='width:40px;' >).
\r
957 If the total table width is less than the browser width then this works; however if it is greater, then the browser often ignores <col width>
\r
958 and tries to squeeze all of the columns into the available window width. Thus, using this method to set the column width is unreliable. Otherwise...
\r
960 <li>If <a href='#defaultWidth'>options.defaultWidth</a> is false, then the column's width is set to options.defaultWidth (which defaults to 100).
\r
962 Therefore, the most reliable way to set column widths in LiveGrid and SimpleGrid is to specify a width for every column in options.columnSpecs[].
\r
963 If many columns share a common width, then you can shortcut this somewhat by setting options.defaultWidth=false,
\r
964 and setting options.defaultWidth to the common width.
\r
966 <dt><a name='noResize'>noResize</a>
\r
967 <dd>Allow column to be resized? (default <a href='#allowColResize'>grid.options.allowColResize</a> )
\r
970 <dd>By default, LiveGrid assigns a unique CSS class name to each
\r
971 column, which follows the naming convention: table_id + '_col' + column_index.
\r
972 For example, the fourth column in the grid 'mygrid' would have the class name
\r
973 'mygrid_col3'. The value of the ClassName option overrides this default name.
\r
974 The ClassName option is most commonly used to specify column alignment via the
\r
975 Rico-provided 'alignright' and 'aligncenter' classes.
\r
976 So, if you wanted the first 3 columns in your grid to be displayed with white
\r
977 text on a red background, you could do either of the following:
\r
981 .mygrid_col0 div.ricoLG_cell,
\r
982 .mygrid_col1 div.ricoLG_cell,
\r
983 .mygrid_col2 div.ricoLG_cell {
\r
985 background-color: red;
\r
993 .WhiteOnRed div.ricoLG_cell {
\r
995 background-color: red;
\r
999 columnSpecs : [{ClassName:'WhiteOnRed'},
\r
1000 {ClassName:'WhiteOnRed'},
\r
1001 {ClassName:'WhiteOnRed'},
\r
1005 Finally, please note that this ClassName is not applied to the grid headings -
\r
1006 use a align="right" on the <th> tag to accomplish the header alignment.
\r
1008 <dt>type (DataType in .net plug-in)
\r
1009 <dd>A string containing one of these values:
\r
1011 <li>text - any tags in the column value are removed before being displayed to the user.
\r
1012 <li>showTags - any tags in the column value are displayed to the user as text.
\r
1013 <li>number - column value is treated as a number,
\r
1014 and any <a href='#NumberFormatting'>number formatting options</a>
\r
1015 supplied in the column specification are applied.
\r
1016 <li>datetime - column value is treated as a date & time,
\r
1017 and any <a href='#DateFormatting'>date formatting options</a>
\r
1018 supplied in the column specification are applied.
\r
1019 <li>UTCasLocalTime - column/database value is treated as a GMT/UTC date & time, and any <a href='#DateFormatting'>date formatting options</a>
\r
1020 supplied in the column specification are applied. Before display, the value is converted to the user's local time zone.
\r
1021 <li>date - column value is treated as a date, and any <a href='#DateFormatting'>date formatting options</a>
\r
1022 supplied in the column specification are applied.
\r
1023 <li>raw (default) - column values are displayed directly to the grid cell.
\r
1024 Any HTML markup gets copied into the cell.
\r
1028 <dt><a name='control'></a>control
\r
1029 <dd>An object that can be used to provide special formatting for a column.
\r
1030 Several column controls are provided with LiveGrid. The code for them
\r
1031 resides in ricoLiveGridControls.js. Here is a brief description of the
\r
1032 provided controls:
\r
1034 <dl style='font-size:smaller;'>
\r
1035 <dt>Rico.TableColumn.checkboxKey(showKey)
\r
1036 <dd>Display unique key column as: <checkbox> <key value>
1037 and keep track of which keys the user selects.
1038 Key values should not contain <, >, or &.
1040 <dt>Rico.TableColumn.checkbox(checkedValue, uncheckedValue, defaultValue, readOnly)
\r
1041 <dd>Display column as checkboxes. Database column should contain only two-values (e.g. yes/no).
1042 The following code is taken from ex7 (column values are 1 and 0):
\r
1044 columnSpecs: [{canHide:false,
\r
1045 control:new Rico.TableColumn.checkbox('1','0'),
\r
1046 ClassName:'aligncenter'},
\r
1050 <dt>Rico.TableColumn.textbox(boxSize, boxMaxLen, readOnly)
\r
1051 <dd>Display the column value in a text box.
\r
1053 <dt>Rico.TableColumn.HighlightCell(chkcol,chkval,highlightColor,highlightBackground,chkop)
\r
1054 <dd>Highlight a grid cell when a particular value is present in the specified column.
\r
1055 chkop optionally specifies the comparison to be performed: ==, !=, <, <=, >, >=.
\r
1056 If not specified, then == is used.
\r
1057 The following code is taken from ex2highlight and highlights the entire row when column 1
\r
1060 var CustId='HANAR';
\r
1062 var highlight=Rico.TableColumn.HighlightCell;
\r
1065 { control:new highlight(CustIdCol,CustId,'red','yellow') },
\r
1066 { control:new highlight(CustIdCol,CustId,'red','yellow') },
\r
1067 { control:new highlight(CustIdCol,CustId,'red','yellow') },
\r
1068 { control:new highlight(CustIdCol,CustId,'red','yellow') },
\r
1069 { control:new highlight(CustIdCol,CustId,'red','yellow') },
\r
1070 { type:'date', control:new highlight(CustIdCol,CustId,'red','yellow') },
\r
1071 { type:'date', control:new highlight(CustIdCol,CustId,'red','yellow') }]
\r
1074 <dt>Rico.TableColumn.bgColor()
\r
1075 <dd>Database value contains a css color name/value
\r
1077 <dt>Rico.TableColumn.link(href,target)
\r
1078 <dd>Database value contains a url to another page.
\r
1079 The href parameter may contain references to grid values by including "{x}" in the string,
\r
1080 where x is a column number. The following code is taken from ex6:
\r
1083 {control:new Rico.TableColumn.link('ex2.asp?id={0}','_blank'),
\r
1088 <dt>Rico.TableColumn.image()
\r
1089 <dd>Database value contains a url to an image.
\r
1090 The following code is taken from photos.php:
\r
1092 imgctl=new Rico.TableColumn.image();
\r
1095 {control:imgctl,width:90},,,
\r
1096 {type:'datetime'},{width:200}]
\r
1099 <dt>Rico.TableColumn.lookup(map, defaultCode, defaultDesc)
\r
1100 <dd>Map a database value to a display value
\r
1102 <dt>Rico.TableColumn.MultiLine()
\r
1103 <dd>Overcomes issues when displaying multi-line content (i.e. content with <br> tags) in IE6 and IE7
\r
1107 <br>It is also possible to write your own column control, which
\r
1108 implements logic specific to your application. Here is an example:
\r
1110 // Display values white on black if
\r
1111 // first column contains the value "reverse"
\r
1112 // Usage: { control:new MyCustomColumn() }
1113 MyCustomColumn = Class.create();
1115 MyCustomColumn.prototype = {
1116 initialize: function() {},
1118 _clear: function(gridCell,windowRow) {
1119 gridCell.style.color='';
1120 gridCell.style.backgroundColor='';
1121 gridCell.innerHTML='&nbsp;';
1124 _display: function(v,gridCell,windowRow) {
1125 var col0=this.liveGrid.buffer.getWindowValue(windowRow,0);
\r
1126 if (col0=="reverse") {
\r
1127 gridCell.style.color='white';
1128 gridCell.style.backgroundColor='black';
\r
1130 gridCell.style.color='';
1131 gridCell.style.backgroundColor='';
1133 gridCell.innerHTML=this._format(v);
1138 <dt><a name='filterUI'></a>filterUI
\r
1139 <dd>If a <a href='#FilterLocation'>FilterLocation</a> option is specified for the grid, then filterUI will control
\r
1140 how each column is filtered. If filterUI is:
\r
1142 <li>null or omitted, then no filter is displayed for the column.
\r
1143 <li>'t' - will generate a text box filter and the records being displayed
\r
1144 are filtered as the user types.
\r
1145 <br>May optionally be followed by a caret (^) to
\r
1146 indicate that text box values should match the beginning of the column value.
\r
1147 Otherwise, they can match anywhere in the column's value.
\r
1148 <br>May also be followed by a number to indicate the size of the text box (default size is 10).
\r
1151 // will create a text box that is 20 characters wide
\r
1152 // text typed into the box will be compared to
\r
1153 // the beginning of each column value
\r
1155 <li>'s' - will generate a select list filter with all possible column values contained in the list.
\r
1156 Populated using a 'select distinct' query if the grid's source is a SQL query.
\r
1160 <dd>Specifies that the filter should be applied to a different column. For example, ex3livegrid.asp/aspx/php
\r
1161 uses this feature to filter the order and ship date columns by year. The full date is shown in the column
\r
1162 in which the filter appears; however, there is another hidden, calculated column containing "year(orderdate)"
\r
1163 to which the filter is applied.
\r
1167 <dt style='color:navy;'><a name='NumberFormatting'></a><em>Number formatting:</em>
\r
1170 <dd>The value is multiplied by this number before it is displayed. (default: 1)
\r
1173 <dd>Number of places to the right of the decimal point. (default: 0)
\r
1176 <dd>Decimal point symbol. (default: '.' but overridden in the translation files)
\r
1179 <dd>Symbol for thousands separator. (default: ',' but overridden in the translation files)
\r
1182 <dd>Specifies how negative numbers should be displayed. Possible values:
\r
1184 <li>L=leading minus (default)
\r
1185 <li>T=trailing minus
\r
1190 <dd>A string added to the beginning of the number. Typically a currency symbol.
\r
1193 <dd>A string added to the end of a number. For example, a "%" symbol.</dd>
\r
1197 <dt style='color:navy;'><a name='DateFormatting'></a><em>Date formatting:</em>
\r
1200 <dd>A string specifying how the date or datetime should be displayed. Default is "translateDate", which means
\r
1201 that the dateFmt and timeFmt strings in the RicoTranslate object are used
\r
1202 (this defaults to "mm/dd/yyyy" for dates and "mm/dd/yyyy hh:nn:ss a/pm" for datetimes,
\r
1203 but is overridden by the various language translation files).
\r
1204 If dateFmt="localeDate", then the value is formatted using javascript's built-in toLocaleDateString() function.
\r
1205 If dateFmt="localeDateTime", then the value is formatted using javascript's built-in toLocaleString() function.
\r
1206 The dateFmt string may contain the following special character sequences:
\r
1209 <li>yyyy - 4 digit year
1210 <li>yy - 2 digit year
1211 <li>mmmm - month name
1212 <li>mmm - 3 character month name abbreviation. In Asian languages this often doesn't make sense - in these cases it returns the full month name (same as mmmm).
1213 <li>mm - 2 digit month number (zero padded)
1214 <li>m - 1 or 2 digit month number
1215 <li>dddd - day-of-the-week
1216 <li>ddd - 3 character day-of-the-week abbreviation
1217 <li>dd - 2 digit day number (zero padded)
1218 <li>d - 1 or 2 digit day number
1219 <li>hh - 2 digit hour, 12-hour clock (zero padded)
1220 <li>h - 1 or 2 digit hour, 12-hour clock
1221 <li>HH - 2 digit hour, 24-hour clock (zero padded)
1222 <li>H - 1 or 2 digit hour, 24-hour clock
1223 <li>nn - 2 digit minutes (zero padded)
1224 <li>ss - 2 digit seconds (zero padded)
1225 <li>a/p - a or p (for am or pm)
1229 // display first column as "month year"
\r
1230 columnSpecs : [{type:date, dateFmt:'mmm yyyy'}]
\r
1235 <dd>A string added to the beginning of the date.
\r
1238 <dd>A string added to the end of a date. For example, you could use this to include a time zone:
\r
1240 // indicate that times are GMT/UTC
\r
1241 columnSpecs : [{type:datetime, suffix:' UTC'}]
\r