Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki:options [2012/08/03 08:17] chrisd Added references to clientArray and clientSide |
wiki:options [2018/02/02 20:50] (current) admin |
||
---|---|---|---|
Line 1: | Line 1: | ||
~~DISCUSSION~~ | ~~DISCUSSION~~ | ||
- | ~~ODT~~ | ||
====== Options ====== | ====== Options ====== | ||
Line 51: | Line 50: | ||
|datastr|string|The string of data when datatype parameter is set to [[wiki:retrieving_data#xml_string | xmlstring]] or [[wiki:retrieving_data#json_string | jsonstring]]|null|Yes| | |datastr|string|The string of data when datatype parameter is set to [[wiki:retrieving_data#xml_string | xmlstring]] or [[wiki:retrieving_data#json_string | jsonstring]]|null|Yes| | ||
|datatype|string|Defines in what format to expect the data that fills the grid. Valid options are ''xml'' (we expect data in xml format), ''xmlstring'' (we expect xml data as string), ''json'' (we expect data in JSON format), ''jsonstring'' (we expect JSON data as a string), ''local'' (we expect data defined at client side (array data)), ''javascript'' (we expect javascript as data), ''function'' (custom defined function for retrieving data), or ''clientSide'' to manually load data via the ''data'' array. See [[wiki:colmodel_options | colModel API]] and [[wiki:retrieving_data| Retrieving Data]]|xml| Yes| | |datatype|string|Defines in what format to expect the data that fills the grid. Valid options are ''xml'' (we expect data in xml format), ''xmlstring'' (we expect xml data as string), ''json'' (we expect data in JSON format), ''jsonstring'' (we expect JSON data as a string), ''local'' (we expect data defined at client side (array data)), ''javascript'' (we expect javascript as data), ''function'' (custom defined function for retrieving data), or ''clientSide'' to manually load data via the ''data'' array. See [[wiki:colmodel_options | colModel API]] and [[wiki:retrieving_data| Retrieving Data]]|xml| Yes| | ||
- | |deepempty|boolean|This option should be set to ''true'' if an event or a plugin is attached to the table cell. The option uses jQuery empty for the the row and all its children elements. This of course has speed overhead, but prevents memory leaks|false|Yes| | + | |deepempty|boolean|This option should be set to ''true'' if an event or a plugin is attached to the table cell. The option uses jQuery empty for the the row and all its children elements. This of course has speed overhead, but prevents memory leaks. This option should be set to ''true'' if a sortable rows and/or columns are activated.|false|Yes| |
|deselectAfterSort|boolean|Applicable only when we use ''datatype : local''. Deselects currently selected row(s) when a sort is applied.|true| Yes| | |deselectAfterSort|boolean|Applicable only when we use ''datatype : local''. Deselects currently selected row(s) when a sort is applied.|true| Yes| | ||
|direction|string|Determines the direction of text in the grid. The default is ''ltr'' (Left To Right). When set to ''rtl'' (Right To Left) the grid automatically changes the direction of the text. It is important to note that in one page we can have two (or more) grids where the one can have direction ''ltr'' while the other can have direction ''rtl''. This option works only in Firefox 3.x versions and Internet Explorer versions >=6. Currently Safari, Google Chrome and Opera do not completely support changing the direction to ''rtl''. The most common problem in Firefox is that the default settings of the browser do not support ''rtl''. In order change this see this [[wiki:howto_grid_base |HOW TO]] section in this chapter .|ltr|No| | |direction|string|Determines the direction of text in the grid. The default is ''ltr'' (Left To Right). When set to ''rtl'' (Right To Left) the grid automatically changes the direction of the text. It is important to note that in one page we can have two (or more) grids where the one can have direction ''ltr'' while the other can have direction ''rtl''. This option works only in Firefox 3.x versions and Internet Explorer versions >=6. Currently Safari, Google Chrome and Opera do not completely support changing the direction to ''rtl''. The most common problem in Firefox is that the default settings of the browser do not support ''rtl''. In order change this see this [[wiki:howto_grid_base |HOW TO]] section in this chapter .|ltr|No| | ||
Line 72: | Line 71: | ||
|inlineData|empty object|an array used to add content to the data posted to the server when we are in inline editing. |{}|Yes| | |inlineData|empty object|an array used to add content to the data posted to the server when we are in inline editing. |{}|Yes| | ||
|jsonReader|array| An array which describes the structure of the expected json data. For a full description and default setting, see [[wiki:retrieving_data#json_data| Retrieving Data JSON Data]]| |No| | |jsonReader|array| An array which describes the structure of the expected json data. For a full description and default setting, see [[wiki:retrieving_data#json_data| Retrieving Data JSON Data]]| |No| | ||
- | |lastpage|integer| Readonly property. Gives the total number of pages returned from the request. |0|No| | + | |lastpage|integer| Gives the total number of pages returned from the request. If you use a function as datatype, your_grid.setGridParam({lastpage: your_number}) can be used to specify the max pages in the pager. |0|No| |
|lastsort|integer| Readonly property. Gives the index of last sorted column beginning from 0. |0|No| | |lastsort|integer| Readonly property. Gives the index of last sorted column beginning from 0. |0|No| | ||
|loadonce|boolean|If this flag is set to ''true'', the grid loads the data from the server only once (using the appropriate datatype). After the first request, the datatype parameter is automatically changed to ''local'' and all further manipulations are done on the client side. The functions of the pager (if present) are disabled.|false|No| | |loadonce|boolean|If this flag is set to ''true'', the grid loads the data from the server only once (using the appropriate datatype). After the first request, the datatype parameter is automatically changed to ''local'' and all further manipulations are done on the client side. The functions of the pager (if present) are disabled.|false|No| | ||
Line 82: | Line 81: | ||
|multiselect|boolean| If this flag is set to ''true'' a multi selection of rows is enabled. A new column at left side containing checkboxes is added. Can be used with any datatype option. |false| No. see HOWTO| | |multiselect|boolean| If this flag is set to ''true'' a multi selection of rows is enabled. A new column at left side containing checkboxes is added. Can be used with any datatype option. |false| No. see HOWTO| | ||
|multiselectWidth|integer| Determines the width of the checkbox column created when the ''multiselect'' option is enabled. |20|No| | |multiselectWidth|integer| Determines the width of the checkbox column created when the ''multiselect'' option is enabled. |20|No| | ||
+ | |multiSort|boolean|If set to true enables the multisorting. The options work if the datatype is local. In case when the data is obtained from the server the //sidx// parameter contain the order clause. It is a comma separated string in format field1 asc, field2 desc ..., fieldN. Note that the last field does not not have asc or desc. It should be obtained from sord parameter \\ When the option is true the behavior is a s follow. The first click of the header field sort the field depending on the firstsortoption parameter in colModel or sortorder grid parameter. The next click sort it in reverse order. The third click removes the sorting from this field|false|Yes| | ||
|page|integer| Set the initial page number when we make the request.This parameter is passed to the url for use by the server routine retrieving the data. |1|Yes| | |page|integer| Set the initial page number when we make the request.This parameter is passed to the url for use by the server routine retrieving the data. |1|Yes| | ||
|pager|mixed| Defines that we want to use a pager bar to navigate through the records. This must be a valid HTML element; in our example we gave the div the id of "pager", but any name is acceptable. Note that the navigation layer (the "pager" div) can be positioned anywhere you want, determined by your HTML; in our example we specified that the pager will appear after the body layer. The valid settings can be (in the context of our example) ''pager'', ''#pager'', ''jQuery('#pager')''. I recommend to use the second one - ''#pager''. See [[Pager]]|empty string. <del>Currently only one pagebar is possible.</del>|No| | |pager|mixed| Defines that we want to use a pager bar to navigate through the records. This must be a valid HTML element; in our example we gave the div the id of "pager", but any name is acceptable. Note that the navigation layer (the "pager" div) can be positioned anywhere you want, determined by your HTML; in our example we specified that the pager will appear after the body layer. The valid settings can be (in the context of our example) ''pager'', ''#pager'', ''jQuery('#pager')''. I recommend to use the second one - ''#pager''. See [[Pager]]|empty string. <del>Currently only one pagebar is possible.</del>|No| | ||
Line 102: | Line 102: | ||
|savedRow|array| This is a readonly property and is used in inline and cell editing modules to store the data, before editing the row or cell. See [[Cell Editing]] and [[Inline Editing]]. |empty array|No| | |savedRow|array| This is a readonly property and is used in inline and cell editing modules to store the data, before editing the row or cell. See [[Cell Editing]] and [[Inline Editing]]. |empty array|No| | ||
|<del>searchdata</del>|<del>array {}</del>|<del>This property contain the searched data in pair name:value.</del>|<del>empty array{}</del>|<del>Yes</del>| | |<del>searchdata</del>|<del>array {}</del>|<del>This property contain the searched data in pair name:value.</del>|<del>empty array{}</del>|<del>Yes</del>| | ||
- | |scroll|boolean or \\ integer|Creates dynamic scrolling grids. When enabled, the pager elements are disabled and we can use the vertical scrollbar to load data. When set to ''true'' the grid will always hold all the items from the start through to the latest point ever visited. \\ When ''scroll'' is set to an integer value (example 1), the grid will just hold the visible lines. This allow us to load the data in portions whitout caring about memory leaks. In addition to this we have an optional extension to the server protocol: ''npage'' (see ''prmNames'' array). If you set the npage option in ''prmNames'', then the grid will sometimes request more than one page at a time; if not, it will just perform multiple GET requests. |false|No| | + | |scroll|boolean or \\ integer|Creates dynamic scrolling grids. When enabled, the pager elements are disabled and we can use the vertical scrollbar to load data. When set to ''true'' the grid will always hold all the items from the start through to the latest point ever visited. \\ When ''scroll'' is set to an integer value (example 1), the grid will just hold the visible lines. This allow us to load the data in portions whitout caring about memory leaks. In addition to this we have an optional extension to the server protocol: ''npage'' (see ''prmNames'' array). If you set the npage option in ''prmNames'', then the grid will sometimes request more than one page at a time; if not, it will just perform multiple GET requests. \\ Note that this option is not compatible when a grid parameter **height** is set to ''auto'' or ''100%''. |false|No| |
|scrollOffset|integer| Determines the width of the vertical scrollbar. Since different browsers interpret this width differently (and it is difficult to calculate it in all browsers) this can be changed. |18|No.Method avail.| | |scrollOffset|integer| Determines the width of the vertical scrollbar. Since different browsers interpret this width differently (and it is difficult to calculate it in all browsers) this can be changed. |18|No.Method avail.| | ||
|scrollTimeout|integer \\ (milliseconds)| This controls the timeout handler when ''scroll'' is set to 1. |200|Yes| | |scrollTimeout|integer \\ (milliseconds)| This controls the timeout handler when ''scroll'' is set to 1. |200|Yes| | ||
Line 145: | Line 145: | ||
<head> | <head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
+ | <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<title>My First Grid</title> | <title>My First Grid</title> | ||
| | ||
Line 189: | Line 190: | ||
<head> | <head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
+ | <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<title>My First Grid</title> | <title>My First Grid</title> | ||
| |