The following description format is: property name
Parameter Value Type
Description (multiple lines may exist)
Default Value
Whether the attribute can be modified (whether the attribute can be modified after the grid is created. That is to say, whether the attribute value of grid initialization can be modified)
---- Detailed attribute list ----
Ajaxgridoptions
Object
This option is used to set global Ajax settings. Note: This option will overwrite all current Ajax settings, including Ajax error, complete, and beforesend events.
Default Value: Empty object
This attribute can be modified
Ajaxselectoptions
Object
This option is used to set the Ajax global settings of the select element. In the searchoptions option or editoptions option attribute settings, you can set dataurl to obtain the URL that generates the content of a select drop-down box. Jqgrid uses ajax to access this URL to automatically obtain the selectable value.
Note: the result returned by dataurl is shown in <SELECT> <option value = http://blog.soso.com/qz.q/1_1"> one </option> <option value = "2"> two </option> </SELECT> string in this format. Of course, you can also directly return data in the format of 1: One; 2: two. However, if you want to use another option to process the data, the data must be converted to the above string after processing. For example, in searchoptions, a property is buildselect, which is used to do this.
Default Value: Empty object
This attribute can be modified
Altclass
String
Class used to set the alternate rows of jqgrid. It is valid only when altrows is set to true.
Default Value: UI-priority-Secondary
This attribute can be modified. Requires reload
Altrows
Boolean
Set jqgrid to a zebra line style. That is, the line is separated by different background colors.
Default Value: false
This attribute can be modified. After reload
Autoencode
Boolean
If this parameter is set to true, the returned data from the server and the data submitted in the editing mode are HTML encoded. For example, convert the less than symbol to <
Default Value: false
This attribute can be modified
Autowidth
Boolean
If this parameter is set to true, the grid width is automatically recalculated based on the width of the parent element. Note that this value is set during initialization. To set the width during running, you must use the setgridwidth method.
Default Value: false
This attribute cannot be modified.
Caption
String
Set the grid title.
Default Value: empty string
This attribute cannot be modified. Method avail.
Celllayout
Integer
This option sets the padding + Border width of a cell. Do not modify it in general.
Default Value: 5
This attribute cannot be modified.
Celledit
Boolean
Set whether the cell editing mode is enabled.
Default Value: false
This attribute can be modified
Cellsubmit
String
In cell editing mode, whether the content is saved to the remote server or a local array. 'Remote' or 'clientarray '.
Default Value: 'remote'
This attribute can be modified
Cellurl
String
Determine the access URL in cell editing mode.
Default Value: NULL
This attribute can be modified
Colmodel
Array
Important attributes. Used to set the column name.
Default Value: empty array
This attribute cannot be modified.
Colnames
Array []
Important attributes. Used to set the attribute of each column in the grid. A column is set as an array element. The name attribute is required.
Note: the length of the array (that is, the number of columns) must be the same as that of the colmodel array. For more details, you must separately describe them.
Default Value: empty array []
This attribute cannot be modified.
Datastr
String
If the datatype attribute is set to xmlstring or jsonstring, this attribute is used to set its value.
Default Value: NULL
This attribute can be modified
Datatype
String
Determine the data source format displayed in the grid.
XML data;
Xmlstring is treated as the XML data of the string;
JSON format data;
JSON data of a jsonstring;
Local defines the array of data on the client;
Javascript JavaScript data
Function a user-defined function is used to obtain data;
Default Value: XML
This attribute can be modified
Deselectaftersort
Boolean
This parameter is valid only when datatype is set to local. After sorting, whether to re-select the selected rows (multiple rows) Before sorting ).
Default Value: True
This attribute can be modified
Direction
String
Determine the direction of text display in the grid. The default LTR indicates the right path from the left. Another optional value is RTL, which indicates the conversion from right to left.
This option is only valid in Firefox 3. X and IE> = 6 browsers. Currently, Safai, Google Chrome, and opera do not fully support RTL ". Firefox does not support RTL by default, but it can be supported by modifying Firefox's layout. scrollbar. Side to 1. This attribute is newly added in jqgrid v3.6.
Default Value: LTR
This attribute cannot be modified.
Editurl
String
Set the edited URL.
Default Value: NULL
This attribute can be modified
Emptyrecords
String
Set the information displayed on jqgrid when the number of query records is 0. This parameter is valid only when the viewrecords option is set to true.
Default Value: See Lang File
This attribute can be modified
Expandcolclick
Boolean
Set to true. When we click the treegrid text, the content will be expanded or shrunk.
Default Value: True
This attribute cannot be modified.
Expandcolumn
String
Specify the column (the name of colmodel to specify) to expand the tree grid. If not set, the column is the first by default. It is valid only when the treegrid option is set to true.
Default Value: NULL
This attribute cannot be modified.
Footerrow
Boolean
If it is set to true, a table with only one row is displayed on the navigation bar at the bottom of the grid. The number of columns is the same as that defined by colmodel.
Default Value: false
This attribute cannot be modified.
Forcefit
Boolean
If it is set to true and the column width is changed, the column width near the right is automatically adjusted to adapt to the overall width of the grid. In this case, there is no horizontal scroll bar.
Note: This option is incompatible with the shrinktofit option. If shrinktofit is set to false, the forcefit setting will be ignored.
Default Value: false
This attribute cannot be modified.
Gridstate
String
Set the Grid status. There are two optional values: 'visible 'and 'hidd'
Default Value: visible
This attribute cannot be modified.
Gridview
Boolean
In versions earlier than jqgrid v3.4.x, reading big data sets has a speed issue. The main reason is that each cell is inserted to the grid with 5-6 jquery calls. Now we can solve this problem by setting the gridview option to true. At this time, we use jquery to append the whole row of data. 3-5 times faster than before.
Of course, there are limits on the use. After the value is set to true, the treegrid, subgrid, or afterinsertrow event cannot be used.
Default Value: false
This attribute can be modified
Height
Mixed
The height of the grid. If it is set to '123', the height can be adaptive. Note that, if we set the number of entries displayed on each page to 50 records and set height = '000000', some subsequent records may not be displayed. By default, grid does not have a vertical scroll bar.
Default Value: 150
This attribute cannot be modified. Method avail.
Hiddengrid
Boolean
Set to true. The initial display of the grid is hidden. When hidden, the data is not loaded (no request is sent to the server) and only the title is displayed. When the grid is displayed for the first time, server requests are submitted and data is displayed.
Default Value: false
This attribute cannot be modified.
Hidegrid
Boolean
Set whether the hide/Show button of the grid is available.
Default Value: True
This attribute cannot be modified.
Hoverrows
Boolean
If this parameter is set to false, the mouse suspension is disabled in the Data row of the grid.
Default Value: false
This attribute can be modified
Jsonreader
Array
Defines the format description of JSON data. The default expected data format is: the default data root node name is rows, and the current page name is page ....... Assume that the root name is not rows but datas, And the Page name is not page but currentpage. You can redefine jsonreader to read the data as follows:
Jsonreader :{
Root: "datas ",
Page: "currentpage"
}
Default Value: None
This attribute cannot be modified.
Lastpage
Integer
Read-only attribute, which specifies the total number of pages that a request can return.
Default Value: 0
This attribute cannot be modified.
Lastsort
Integer
Read-only attribute. Specifies the final sorting column. Starts from 0.
Default Value: 0
This attribute cannot be modified.
Loadonce
Boolean
If it is set to true, the grid loads data only once from the server. After the data is loaded, datatype is specified as local, and all subsequent operations are client-based, and the navigation function is disabled.
Default Value: false
This attribute cannot be modified.
Loadtext
String
The waiting information displayed on the page when you request or Sort data.
Default Value: loading...
This attribute cannot be modified.
Loadui
String
This option controls what to do during the execution of an Ajax request.
Disable indicates that jqgrid is unavailable.
Enable-displays "loading" information.
Block displays the "loading" Information and blocks all grid operations until the Ajax request is complete. Note that this will disable all sorting, navigation, or any toolbar operations.
Default Value: Enable
This attribute can be modified
Mtype
String
Determine the request method. "Post" or "get"
Default Value: Get
This attribute can be modified
Multikey
String
It makes sense only when the multiselect option is set to true. Define which key is used for multiple selections. Value Options: shiftkey/altkey/ctrlkey
Default Value: empty string
This attribute can be modified
Multiboxonly
Boolean
It only works when multiselect = true. If multiselect is set to true, you can select a row at any position when you click the row. When multiboxonly is set to true, the row is selected only when the checkbox before the row is clicked. If you click another row that is not selected, the row in the vertex is selected, and the other row is deselected. (Yahoo Mode)
Default Value: false
This attribute can be modified
Multiselect
Boolean
Determines whether data rows in the grid can be selected multiple times. A checkbox box is added to the far left of the grid.
Default Value: false
This attribute cannot be modified. See howto
Multiselectwidth
Integer
Set the width of the multiselect column when multiselect is set to true.
Default Value: 20
This attribute cannot be modified.
Page
Integer
Set the initial page number. This parameter is automatically added after the URL and passed to the backend server processing program.
Default Value: 1
This attribute can be modified
Pager
Mixed
Specify the navigation bar object. Here, you must use the jquery syntax to specify an existing HTML Element Object. In most cases, the ID of a div object is specified.
There are several ways to specify: (assume that the ID of the DIV is NAV)
Jquery ('# nav ')
'# Nav' (this method is recommended)
'Nav'
Default Value: empty string. Currently only one pagebar is possible.
This attribute cannot be modified.
Pagerpos
String
Determine the position of pager in the grid. By default, pager is divided into three parts. Some are used to display pager, some are used as navigation bar buttons, and some are used to display record information.
Default Value: Center
This attribute cannot be modified.
Pgbuttons
Boolean
Determine whether to display the pager button.
Default Value: True
This attribute cannot be modified.
Pginput
Boolean
Determine whether to display the input box that allows users to directly enter the page number for jump.
Default Value: True
This attribute cannot be modified.
Pgtext
String
Displays the status of the current page. The first parameter is the current page number, and the second parameter is the total page number.
Default Value: See Lang File
This attribute can be modified
Prmnames
Array
Customizes the name of the Post Data Field passed to the server. The default value is:
Prmnames: {page: "page", rows: "rows", sort: "sidx", order: "sord", search: "_ search", Nd: "nd ", npage: NULL}
By default, the uploaded data is shown in the following URL:
URL? Page = 1 & rows = 10 & sidx = myindex & sord = ASC
If we set this property {sort: "mysort"}, the actual URL to be called is as follows:
URL? Page = 1 & rows = 10 & mysort = myindex & sord = ASC
You can change the field name by setting this attribute.
Default Value: None
This attribute can be modified
Postdata
Array
Set other parameters that are directly transmitted to the server through URL. The call method of this attribute is to pass a form such as {name1: value, name2: value2 ...} .
Default Value: empty array
This attribute can be modified
Reccount
Integer
Read-only attribute. Determine the number of records displayed in the grid. Do not confuse this attribute with the records parameter. The records parameter determines the maximum number of data entries per page.
Default Value: 0
This attribute cannot be modified.
Recordpos
String
Determine the position of the number of records on the pager. Possible values: Left, center, right
Default Value: Right
This attribute cannot be modified.
Records
Integer
Read-only attribute. Determine the number of records returned from the request.
Default Value: None
This attribute cannot be modified.
Recordtext
String
The information displayed on Pager. Valid when the viewrecords attribute is set to true. It is displayed only when the total number is greater than 0.
This is a display string formatted with {n. The first parameter {0} indicates the starting position of the record (The position of the first record displayed by the grid in all records ), the second parameter {1} represents the position of the last record of the grid in the total record, and the third parameter {2} represents the total number of records.
For example: from {0} to {1} {2}
Default Value: See Lang File
This attribute can be modified
Resizeclass
String
Specify a realistic style class when the column width is adjusted.
Default Value: empty string
This attribute cannot be modified.
Rowlist
Array []
This parameter is used to generate a selectable drop-down menu for grid to adjust the number of records displayed on each page. Select and modify this value in grid. jqgrid uses a new value to modify the rownum parameter and transmits it to the server. Formats that can be set: [10, 20, 30]
Default Value: empty array-[]
This attribute cannot be modified.
Rownumbers
Boolean
If it is set to true, a column is added to the left of the grid. The added column is used to display the number of record rows. The record is displayed from 1. In this case, colmodel is automatically extended by a column named RN. Therefore, we should note that we should not use the name = 'rn 'in the column we define.
Default Value: false
This attribute cannot be modified.
Rownum
Integer
Set how many records are displayed on each grid page.
This parameter is passed to the server through the URL parameter for paging.
Note: If you set the page to display up to 10 records, that is, rownum = 10, but the server returns 15 records, only 10 records will be displayed on the page.
Setting this value to-1 indicates that there is no limit on the page display records.
Default Value: 20
This attribute can be modified
Rownumwidth
Integer
If rownumbers is set to true, this attribute is used to set the width of the column.
Default Value: 25