Log In | Users | Register
%SITEMAPWHAT%
Edit | Attach | New | Raw | Delete | History | Subscribe | Print | Tools
You are here: System » JQGridPlugin

JQGridPlugin

jqGrid is an Ajax-enabled JavaScript control that provides solutions for representing and manipulating tabular data on the web. Since the grid is a client-side solution loading data dynamically through Ajax callbacks, it can be integrated with any server-side technology, including PHP, ASP, Java Servlets, JSP, ColdFusion, and Perl. For more read the jqgriddocs. See also the jqgrid wiki for up-to-date documentation.

Source

Homepage: http://www.trirand.com/blog/
Author(s): Tony Tomov
Version: 3.6.5

Syntax

%GRID{"<query>" form="..." }%

render a grid of topics matching the given query

Parameter Description Default
query search query searching for topics that have the named form attached to it
web web where o start the query BASEWEB
form DataForm definition which describes the columns of the grid  
columns name of columbns to display; these are the formfield names as specified in the DataForm definition in the specified form; there is a list of special column names that are remapped to topic properties (see below) all columns in the DataForm
include regluar expression columns/formfields must match to be included in the grid model  
exclude regluar expression columns/formfields must NOT match to be included in the grid model  
rows number of rows to display in the grid per page 20
rownumbers toggle on/off displaying the row number in the first column of the grid off
filterbar toggle on/off displaying a filter input field at the top of each column to narrow down search results off
toolbar toggle on/off displaying a toolbar at the bottom of the grid; switch this on for pagination off
sort name of column to sort the grid initially first column (excluding the optional row numbers)
reverse toggle on/off reverse sorting order off
caption caption to be displayed at the top of the grid  
pager toggle on/off the pager in the toolbar off
viewrecords toggle on/off computing the total number of records and pages as part of the pager on
height height of the grid; can be set as a number or auto  
width width of the grid; if not set, the grid's width is the sum of the width of all column  
scroll when enabled the pager element is disabled; data is loaded dynamically while scrolling down the grid off
rowlist comma separated list of optional number of rows to select from in the grid interface 5, 10, 20, 30, 40, 50, 100
colname_title (per column option) title of the column field title as specified in the DataForm
colname_resizable (per column option) toggle on/off whether the width of the column can be changed by the user on
colname_align (per column option) alignment of the data in the cell left
colname_width (per column option) width of this column in pixel  
colname_search (per column option) toggle on/off if this column is searchable or not on

Special columns

Normnally, the data and the way it is displayed in a GRID is specified by the DataForm definition the GRID expression points to. However, there's a set of additional properties of a topic that can be displayed in a GRID. These are specified in the columns parameter to %GRID and are mapped to the actual property as follows:

Colname Data Displayed
Topic topic name link to topic
Modified, Changed time when the topic has been changed recently standard date format
By, Author author of the last modification link to author's homepage
Image, Photo formfields of that name displayed as html <img> tag where the data is used as src link

When FlexFormPlugin is installed, each cell is rendered using %RENDERFORDISPLAY expression.

When ImagePlugin is installed, each Image/Photo cell is renderd using an %IMAGE expression to render thumbnails.

WARNING: This part is still in flux and solved rather adhoc for now. The way how to specify which data is displayed in which way per column is still subject to further changes.

Examples

%GRID{ form="System.UserForm" web="Main" columns="Topic,FirstName,LastName,Organization,Country,Telephone" filterbar="on" rownumbers="on" width="auto" height="auto" }%

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

Plugin Info

Author(s): Michael Daum
Copyright: 2009-2010 Michael Daum http://michaeldaumconsulting.com
License: GPL
Release: 0.2
Version: 7667 (2010-06-07)
Change History:  
26 May 2010: fixed loading locales; improved grid construction process; added field-specific options (title, resizable, align, width, search); ongoing work on colmodel
26 Mar 2010: initial release, externalized from Foswiki:Extensions/JQueryPlugin
Dependencies:
NameVersionDescription
Foswiki::Plugins::JQueryPlugin>3.31Required
Home: Foswiki:Extensions/JQGridPlugin
Support: Foswiki:Support/JQGridPlugin
spacer
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
Syndicate this site RSS ATOM