KoolGrid Class [PHP]
Summary
Properties | Description | |
AjaxEnabled | Enable ajax feature of KoolGrid. | |
AjaxHandlePage | Get or set the service page which KoolGrid will send ajax request. | |
AjaxLoadingImage | Get or set url of ajax loading image. | |
AllowDeleting | Allow KoolGrid delete data. | |
AllowEditing | Allow KoolGrid edit and update data to datasource. | |
AllowFiltering | When true, all columns in grid will enable filtering feature. | |
AllowGrouping | When true, all columns in grid will enable grouping feature. | |
AllowHovering | Allow row highlighted when mouse is over. | |
AllowMultiSelecting | Allow selecting more than one row. | |
AllowResizing | When true, all resizable columns in grid will enable resizing feature. | |
AllowScrolling | Allow all tableview in grid scrollable. | |
AllowSelecting | Allow row selected | |
AllowSorting | When true, all sortable columns in grid will enable sorting feature. | |
AutoGenerateColumns | When true, grid will generate and add data-driven columns to all tableviews automatically. | |
AutoGenerateDeleteColumn | When true, grid will add delete command column to all tableviews automatically. | |
AutoGenerateEditColumn | When true, grid will add edit command column to all tableviews automatically. | |
AutoGenerateExpandColumn | When true, grid will add GridExpandDetailColumn to all tableviews automatically. | |
AutoGenerateRowSelectColumn | When true, grid will add GridRowSelectColumn to all tableviews automatically. | |
CharSet | Get or set the charset. | |
ClientSettings | Contain settings for client behaviours and messages. | |
ColumnAlign | Get or set alignment of column's text | |
ColumnValign | Get or set vertical alignment of column's text | |
ColumnWrap | When true, all columns in grid will be in wrap mode. | |
DataSource | Get or set default datasource for all tableviews. | |
DisableAutoGenerateDataFields | Get or set the list of field names that will not be generated column by KoolGrid. | |
EventHandler | Get or set the object to handle grid events. | |
FilterOptions | Get or set default filter options for all columns in grid. | |
Height | Get or set detfault height of all tableviews. | |
KeepGridRefresh | When true, grid will keep update up with new data. | |
KeepRowStateOnRefresh | Keep row state on refresh. | |
KeepSelectedRecords | When true, grid will keep selected records persistent againts postback or callback. | |
KeepViewStateInSession | Make grid persistent in session. | |
Localization | Contain settings for grid localization. | |
MasterTable | Master table object. | |
PageSize | Get or set the default page size for tableviews. | |
RowAlternative | When true, it make grid show alternative color for each row. | |
scriptFolder | Get or set the path to folder which contains KoolGrid script. | |
ShowFooter | When true, it make footer of all tableviews visible. | |
ShowHeader | When true, it make header of all tableviews visible. | |
ShowStatus | When true, grid will show the status bar at bottom of grid. | |
SingleColumnSorting | When true, only one column is allowed sorting at a time. | |
Status | KoolGrid status bar settings. | |
styleFolder | Get or set the folder which KoolGrid will load css to render. | |
TableLayout | Get or set layout of all tableviews. | |
Width | Get or set detfault width of all tableviews. |
Methods | Description | |
Render | Render the KoolGrid | |
RegisterScript | Return html to register js library for KoolGrid. | |
RegisterCSS | Return html to register CSS for KoolGrid | |
RenderGrid | Return html content of KoolGrid body | |
StartupScript | Regiser script to be at client from sever-side. | |
Process | Process request and data before grid render. | |
Refresh | Force the grid to refresh. | |
GetInstanceMasterTable | Get the master table object after being processed. | |
RegisterClientEvent | Register client-side event. |
Properties Detail
AjaxHandlePageTop
string AjaxHandlePage
Get or set the service page which KoolGrid will send ajax request.
Supported from version: 1.0.0.0
AjaxLoadingImageTop
string AjaxLoadingImage
Get or set url of ajax loading image. This property only work when grid ajax is enablled.
Supported from version: 1.0.0.0
AllowEditingTop
bool AllowEditing
Allow KoolGrid edit and update data to datasource.
Supported from version: 1.0.0.0
AllowFilteringTop
bool AllowFiltering
When true, all columns in grid will enable filtering feature.
Supported from version: 1.0.0.0
AllowGroupingTop
bool AllowGrouping
When true, all columns in grid will enable grouping feature.
Supported from version: 2.0.0.0
AllowHoveringTop
bool AllowHovering
Allow row highlighted when mouse is over.
Supported from version: 1.0.0.0
AllowMultiSelectingTop
bool AllowMultiSelecting
Allow selecting more than one row.
Supported from version: 1.0.0.0
AllowResizingTop
bool AllowResizing
When true, all resizable columns in grid will enable resizing feature.
Supported from version: 1.0.0.0
AllowScrollingTop
bool AllowScrolling
Allow all tableview in grid scrollable.
Supported from version: 1.0.0.0
AllowSortingTop
bool AllowSorting
When true, all sortable columns in grid will enable sorting feature.
Supported from version: 1.0.0.0
AutoGenerateColumnsTop
bool AutoGenerateColumns
When true, grid will generate and add data-driven columns to all tableviews automatically.
Supported from version: 1.0.0.0
AutoGenerateDeleteColumnTop
bool AutoGenerateDeleteColumn
When true, grid will add delete command column to all tableviews automatically.
Supported from version: 1.0.0.0
AutoGenerateEditColumnTop
bool AutoGenerateEditColumn
When true, grid will add edit command column to all tableviews automatically.
Supported from version: 1.0.0.0
AutoGenerateExpandColumnTop
bool AutoGenerateExpandColumn
When true, grid will add GridExpandDetailColumn to all tableviews automatically.
Supported from version: 1.0.0.0
AutoGenerateRowSelectColumnTop
bool AutoGenerateRowSelectColumn
When true, grid will add GridRowSelectColumn to all tableviews automatically.
Supported from version: 1.0.0.0
CharSetTop
string CharSet
Get or set the charset.
Default value : "UTF-8"
Allowed values :
- "ISO-8859-1" : Western European, Latin-1
- "ISO-8859-15" : Western European, Latin-9. Adds the Euro sign, French and Finnish letters missing in Latin-1(ISO-8859-1).
- "UTF-8" : ASCII compatible multi-byte 8-bit Unicode.
- "cp866" : DOS-specific Cyrillic charset. This charset is supported in 4.3.2.
- "cp1251" : Windows-specific Cyrillic charset. This charset is supported in 4.3.2.
- "cp1252" : Windows specific charset for Western European.
- "KOI8-R" : Russian. This charset is supported in 4.3.2.
- "BIG5" : Traditional Chinese, mainly used in Taiwan.
- "GB2312" : Simplified Chinese, national standard character set.
- "BIG5-HKSCS" : Big5 with Hong Kong extensions, Traditional Chinese.
- "Shift_JIS" : Japanese
- "EUC-JP" : Japanese
Supported from version: 1.4.0.0
ClientSettingsTop
ClientSettings ClientSettings
Contain settings for client behaviours and messages.
Supported from version: 1.0.0.0
ColumnAlignTop
string ColumnAlign
Get or set alignment of column's text
Default value : "left"
Allowed values :
- "left" : Text in column aligns in left side
- "center" : Text in column aligns in center
- "right" : Text in column aligns in right side
Supported from version: 1.0.0.0
ColumnValignTop
string ColumnValign
Get or set vertical alignment of column's text
Default value : "left"
Allowed values :
- "top" : Top alignment
- "middle" : Middle alignment
- "left" : Bottom alignment
Supported from version: 1.0.0.0
ColumnWrapTop
bool ColumnWrap
When true, all columns in grid will be in wrap mode. The long text will be broken in more than one line.
Supported from version: 1.0.0.0
DataSourceTop
DataSource DataSource
Get or set default datasource for all tableviews.
Supported from version: 1.0.0.0
DisableAutoGenerateDataFieldsTop
string DisableAutoGenerateDataFields
Get or set the list of field names that will not be generated column by KoolGrid. When you set AutoGenerateColumns
to true
, by default, KooLGrid will build columns for all available fieldnames. With this DisableAutoGenerateDataFields
, you can choose the datafields that you do not want to build columns.
Supported from version: 1.0.0.0
EventHandlerTop
GridEventHandler EventHandler
Get or set the object to handle grid events.
Supported from version: 1.0.0.0
FilterOptionsTop
array FilterOptions
Get or set default filter options for all columns in grid.
Default value : array("No_Filter","Equal","Not_Equal","Greater_Than","Less_Than","Greater_Than_Or_Equal","Less_Than_Or_Equal","Contain","Not_Contain","Start_With","End_With");
Supported from version: 1.0.0.0
HeightTop
string Height
Get or set detfault height of all tableviews. The height can only be set with px value. This property is useful when you want grid with fixed height and do scrolling if data is longer than allowed space.
Supported from version: 1.0.0.0
KeepGridRefreshTop
bool KeepGridRefresh
When true, grid will keep update up with new data.
Supported from version: 4.0.0.0
KeepRowStateOnRefreshTop
bool KeepRowStateOnRefresh
Keep states of row on refresh such as: selected, sub-tables and so on.
Supported from version: 3.0.0.0
KeepSelectedRecordsTop
bool KeepSelectedRecords
When true, grid will keep selected records persistent againts postback or callback.
Supported from version: 1.0.0.0
KeepViewStateInSessionTop
bool KeepViewStateInSession
Make grid persistent in session. When true, KoolGrid will use session to store its viewstate. This feature requires PHP Session to be turned on with session_start();
Supported from version: 1.5.0.0
LocalizationTop
GridLocalization Localization
Contain settings for grid localization.
Supported from version: 1.0.0.0
MasterTableTop
GridTableView MasterTable
Master table is the first and default GridTableView's instance of KoolGrid. This tableview is pre-created. You can access and change the settings of this master table.
Supported from version: 1.0.0.0
PageSizeTop
int PageSize
Get or set the default page size for tableviews.
Supported from version: 1.0.0.0
RowAlternativeTop
bool RowAlternative
When true, it make grid show alternative color for each row.
Supported from version: 1.0.0.0
scriptFolderTop
string scriptFolder
Get or set the path to folder which contains KoolGrid script.
Supported from version: 1.0.0.0
ShowHeaderTop
bool ShowHeader
When true, it make header of all tableviews visible.
Supported from version: 1.0.0.0
ShowStatusTop
bool ShowStatus
When true, grid will show the status bar at bottom of grid.
Supported from version: 1.0.0.0
SingleColumnSortingTop
bool SingleColumnSorting
When true, only one column is allowed sorting at a time.
Supported from version: 1.0.0.0
styleFolderTop
string styleFolder
Get or set the folder which KoolGrid will load css to render.
Supported from version: 1.0.0.0
TableLayoutTop
string TableLayout
Get or set layout of all tableviews.
Default value : "auto"
Allowed values :
- "auto" : Text in column aligns in left side
- "fixed" : Text in column aligns in center
Supported from version: 1.0.0.0
WidthTop
string Width
Get or set detfault width of all tableviews. The width can be set with px value of % value.
Supported from version: 1.0.0.0
Methods Detail
RegisterScriptTop
string RegisterScript()
Return html to register js library for KoolGrid.
Supported from version: 1.0.0.0
RegisterCSSTop
string RegisterCSS()
Return html to register CSS for KoolGrid
Supported from version: 1.0.0.0
RenderGridTop
string RenderGrid()
Return html content of KoolGrid body
Supported from version: 1.0.0.0
StartupScriptTop
void StartupScript(string $script)
Regiser script to be at client from sever-side.
Supported from version: 1.0.0.0
ProcessTop
void Process()
Process request and data before grid render.
Supported from version: 1.0.0.0
RefreshTop
void Refresh()
Force the grid to refresh. The data will be rebound.
Supported from version: 1.6.0.0
GetInstanceMasterTableTop
GridTableView GetInstanceMasterTable()
Get the master table object after being processed.
Supported from version: 1.0.0.0
RegisterClientEventTop
void RegisterClientEvent(string $event_name, string $event_handle_function_name)
Register client-side event.
Supported from version: 1.0.0.0