$defaultPage =
[line 66]
The page to starts showing records from.
default is 1
$formAction =
[line 204]
Where should the grid go upon submit
this is a read-only property
$formName =
[line 215]
The form name is automatically generated every time.
Read this property to find out what is the form's generated name
this is a read-only property
$maxNavigationPages =
[line 97]
The maximum number of pages to be shown at once in the navigation tab
default is 10
$noDataMsg =
[line 195]
Message to display if there are no records to display
By default, the strLang_noRecords message is displayed from the language file
If this property is anything else than an empty string, it will be used as the message for when there are no records to display
Default is "" (an empty string)
$recordsOnPageArray =
[line 130]
Array of items to be shown in "records on page" select box in the navigation tab
default is array(5, 10, 15, 20, 25, 50, 100)
$rowsOnPage =
[line 121]
The default number of rows to be displayed on a single page
Note that if the value of this property doesn't exists in recordsOnPageArray, it's value
be lost upon the first submit and will revert to the first value in recordsOnPageArray
default is 15
$scrollNavigationPagesFromPage =
[line 109]
The selected page from which to start scrolling the pages in the navigation tab
(i.e suppose you have 20 pages. at first, pages from 1 through 10 are shown in the navigation tab (if $maxNavigationPages is set to 10) but when you click on page 7 then pages from 2 to 12 will be shown in the navigation tab - that is, if $scrollNavigationPagesFromPage is set to 5)
default is 5
$showBottomCustomTab =
[line 88]
When set to TRUE, a custom tab will be displayed at the bottom of the table (above the bottom navigation tab)
Use addToCustomTab method to add items to the custom tab
default is TRUE
$showBottomNavigation =
[line 57]
When set to TRUE, a navigation tab will be displayed at the bottom of the table
default is TRUE
$showTopCustomTab =
[line 77]
When set to TRUE, a custom tab will be displayed at the top of the table (underneath the top navigation tab)
Use addToCustomTab method to add items to the custom tab
default is TRUE
$showTopNavigation =
[line 48]
When set to TRUE, a navigation tab will be displayed at the top of the table
default is TRUE
$URLa =
[line 182]
The data grid uses POST which is not SEO friendly but might suit some of the implementations.
If you want the data grid to be SEO friendly you should set the useSEO property to TRUE and set this property to a value of your choice, representing the prefix of the page you're currently on, in the data grid. This value will then be appended to the URL where the data grid is shown.
So if you have your data grid at
http://www.mysite.com/example.php
...and you set this property's value to "?page=", upon navigating to another page of the data grid, the URL will become
http://www.mysite.com/example.php?page=X (where X is the current page in the data grid)
...while setting it to "/" will make the URL look like
http://www.mysite.com/example.php/X (where X is the current page in the data grid)
Note that this only work if the useSEO property is set to TRUE
Default is '?page=' (without the quotes)
$useSEO =
[line 155]
The data grid uses POST which is not SEO friendly but might suit some of the implementations.
If you want the data grid to be SEO friendly you should set this property to TRUE and set the URLa property to a value * of your choice, representing the prefix of the page you're currently on, in the data grid. This value will then be appended to the URL where the data grid is shown.
So if you have your data grid at
http://www.mysite.com/example.php
...and you set URLa to "?page=", upon navigating to another page of the data grid, the URL will become
http://www.mysite.com/example.php?page=X (where X is the current page in the data grid)
...while setting it to "/" will make the URL look like
http://www.mysite.com/example.php/X (where X is the current page in the data grid)
Default is FALSE
constructor dataGrid [line 253]
void dataGrid(
string
$source,
&$db, [string
$formAction = ""], string
$db)
|
|
Initializes the grid
Parameters:
method addJavaScript [line 347]
void addJavaScript(
$script)
|
|
Ads an user-defined javascript code block (javascript function or stand-alone commands) that will be outputted with the grid and that can be called by the grid's methods
Do not specify <script></script> headers as they will be automatically added!
You can call this method as many times as you want. Previously set code will not be overwritten
Parameters:
method addToCustomTab [line 369]
void addToCustomTab(
string
$HTMLBlock, [integer
$position = ""])
|
|
Adds an HTML block (refered to as 'item') to the
custom tabSee also showTopCustomTab and showBottomCustomTab
Parameters:
method disableSorting [line 434]
void disableSorting(
string
$columnName)
|
|
Disables sorting possibility for column (by default all columns are sortable)
This method is also available for custom columns
Parameters:
method enableSorting [line 471]
void enableSorting(
string
$columnName)
|
|
Enables sorting for a column on which sorting was previously disabled by using the
disableSorting method
Parameters:
method render [line 500]
boolean render(
[
$toVar = false])
|
|
Outputs the grid
Tags:
Parameters:
method setActionFunction [line 1251]
void setActionFunction(
string
$columnName, string
$actionFunctionName)
|
|
Binds to a column an user defined PHP function that
returns the javascript to be run whenever the onclick event occurs on any of column's fields
The user defined function takes as parameter the value of the field where the onclick event occurred and,
optionally, an array containing all the available fields and their respective values for that particular row
By calling this method you will unset any previously set actions by the setRowActionFunction method for the specified column
Parameters:
method setCallBackFunction [line 1277]
void setCallBackFunction(
string
$columnName, string
$callbackFunctionName)
|
|
Sets a callback function to be run on each value of a specific column before displaying it
The user defined function takes as parameter the value of the field where the onclick event occurred and,
optionally, an array containing all the available fields and their respective values for that particular row
Parameters:
method setColumnHTMLProperties [line 1318]
void setColumnHTMLProperties(
string
$columnName, string
$HTMLProperties)
|
|
Sets HTML attributes for specific column
The properties must be valid HTML markup for the <td> element (or whatever element you are using in the template)
Parameters:
method setDefaultSortColumn [line 1352]
void setDefaultSortColumn(
string
$columnName, [string
$sortDirection = "ASC"])
|
|
Sets the default column to sort the records by, and the direction of sorting
Parameters:
method setFieldHTMLProperties [line 1376]
method setFooterHTML [line 1390]
void setFooterHTML(
string
$HTML)
|
|
Sets the HTML code to be displayed after the rendering of the table but INSIDE the form
Parameters:
method setHeaderHTML [line 1404]
void setHeaderHTML(
string
$HTML)
|
|
Sets the HTML code to be displayed before the rendering of the table but INSIDE the form
Parameters:
method setLanguage [line 1423]
void setLanguage(
$languageFile, string
$language)
|
|
Sets a new language
Default language of the data grid is english
Parameters:
method setRowActionFunction [line 1448]
void setRowActionFunction(
string
$actionFunctionName)
|
|
Specifies a user defined PHP function that
returns the javascript to be run whenever the onclick event occurs on
any field of
any row
After calling this method you can still set specific actions for individual column fields by calling the setActionFunction method.
The user defined function takes as parameter the value of the field where the onclick event occurred and,
optionally, an array containing all the available fields and their respective values for that particular row
Parameters:
method setSecondarySortColumns [line 1474]
void setSecondarySortColumns(
string
$columnNames)
|
|
If you need additional sorting columns, after the primary sort column, use this method to set them
The column set with setDefaultSortColumn or at run-time by the user is known as "the primary sorting column"
Parameters:
method setTemplate [line 1493]
void setTemplate(
string
$template)
|
|
Sets a new template to be used
Default template of the data grid is "default"
Parameters:
method setTitleHTMLProperties [line 1539]
void setTitleHTMLProperties(
string
$columnName, string
$HTMLProperties)
|
|
Sets HTML attributes for specific column's title
The properties must be valid HTML markup for the <td> element (or whatever element is used in the template)
Parameters:
method showColumn [line 1580]
void showColumn(
string
$columnName, [string
$title = ""])
|
|
Sets a column for displaying in the grid (none are displayed by default)
Parameters:
method showCustomColumn [line 1606]
void showCustomColumn(
string
$columnName, [string
$title = ""])
|
|
Specifies a custom column to be shown
A custom column is a column whose data is not found in the data source
The content of a custom column is generated by using the setCallBackFunction method
Parameters:
method showSelectorColumn [line 1639]
void showSelectorColumn(
string
$columnName, string
$controlName, string
$valueSeed)
|
|
Enables a "selector" column - a column with checkboxes enabling the user to mark specific rows as selected
Parameters:
method unsetActionFunction [line 1744]
void unsetActionFunction(
string
$columnName, [string
$block = false])
|
|
Unsets the action function
By calling this method you will unset any previously set actions by the setRowActionFunction or the setActionFunction methods for the specified column
Parameters: