Jqgrid attributes (2)

Source: Internet
Author: User
Tags jqgrid

This attribute cannot be modified.

Savedrow

Array

Read-only attribute. This attribute is used in inline editing and cell editing modes to save data before editing rows or cells.

Default Value: empty array

Scroll cannot be modified for this attribute

Boolean OR integer

Create a dynamically scrolling grid. If this attribute is available, the pager element is disabled and the vertical scroll bar is used to dynamically load data. When it is set to true, the grid will take all the data out of the client during the first loading. When scroll is set to a number, the grid will only display several lines of Visible data.

Note that an optional extension parameter npage is passed to the server. If the npage value is set in the prmnames array, the grid will request multiple pages of data at a time. Therefore, the method for retrieving data by page on the server must be handled with special attention.

Default Value: false

This attribute cannot be modified.

Scroloffset

Integer

Set the width of the vertical scroll bar.

Default Value: 18

This attribute cannot be modified. Method avail.

Scrollrows

Boolean

Set to true. When we use setselection to select a record, the grid will automatically scroll to the selected row record to make the record visible. Assume that the grid has a vertical scroll bar. When we modify the record in form editing mode and use the navigation buttons before and after editing the page to locate the record, when we navigate to a hidden row record, grid automatically scrolls to make the selected Row Records visible.

Default Value: false

This attribute can be modified

Selarrrow

Array-[]

Read-only attribute. When multiselect = true, all selected rows are determined. The values in the array are only the IDs of the selected columns separated by commas. For example, [1, 3, 4, 5] indicates that the row with ID 1, 3, 4, and 5 is selected.

Default Value: empty array []

This attribute cannot be modified.

Selrow

String

Read-only attribute. The ID of the last selected row. If you re-sort or navigate, the value is null. (That is, if no row is selected !)

This attribute is very important. In many cases, if we want to process the data of the selected row, we must use this attribute. You can see that this attribute is used in many examples in jqgrid demo.

Default Value: NULL

This attribute cannot be modified.

Shrinktofit

Boolean

Algorithm used to determine the width of each column during initialization. If this parameter is set to true, the width of each column is scaled proportionally according to the width value set by all columns and the width set by grid. If it is set to false, the column width is displayed according to the width set in colmodel.

Default Value: True

This attribute cannot be modified.

Sortable

Boolean

Set whether the grid can be sorted by column. This property uses the jquery UI sortable plug-in. Make sure that the corresponding file is loaded and that the grid. jqueryui. js package is included when jqgrid is downloaded.

Default Value: false

This attribute cannot be modified.

Sortname

String

When the XML or JSON data type is used, the default sorting field name is set. This parameter is added to the URL and uploaded to the server.

Default Value: empty string

This attribute can be modified

Sortorder

String

When the XML or JSON data type is used, the default sorting method is set. Optional value: ASC or DESC.

Default Value: ASC

This attribute can be modified

Subgrid

Boolean

Set whether subgrid can be used.

Default Value: false

This attribute cannot be modified.

Subgridmodel

Array-[]

Set the description of subgrid. It is valid only when subgrid is set to true. For specific configurable attributes, refer to the subgrid documentation.

Default Value: empty array

This attribute cannot be modified.

Subgridtype

Mixed

A service is allowed to load subgrid. If not set, the datatype of the parent grid is used.

Default Value: NULL

This attribute can be modified

Subgridurl

String

When the URL of The subgrid data is loaded, jqgrid adds the id value of each row to the URL as a parameter. It is valid only when subgrid = true. To pass additional parameters, use the Params option in subgridmodel.

Default Value: empty string

This attribute can be modified

Subgridwidth

Integer

Set the width of the subgrid column.

Default Value: 20

This attribute cannot be modified.

Toolbar

Array

Grid toolbar. The array has two values. The first value indicates whether the toolbar is available. The second value defines the position of the toolbar relative to the body layer. Possible values include "TOP", "bottom", and "both"

When the value is set to [true, "both"], two tool bars are created, one at the top of the table and the other at the bottom of the table.

The ID of the DIV in the top toolbar is equal to the ID of "T _" + grid. The div id of the toolbar at the bottom is equal to the "Tb _" + grid ID. Note: When only one toolbar is created, the div id of the toolbar is equal to the "T _" + grid ID no matter whether the position is at the top or bottom.

Default Value: [false, '']

This attribute cannot be modified.

Totaltime

Integer

Read-only attribute. Calculates the time when data is loaded. Currently, only XML and JSON data can be loaded. The calculation time starts from the request completion, and ends when the last row of records is loaded.

Default Value: 0

This attribute cannot be modified.

Treedatatype

Mixed

Datatype in the case of a tree grid. It is usually consistent with the datatype defined by grid itself. It rarely changes.

Default Value: NULL

This attribute cannot be modified.

Treegrid

Boolean

Enable or disable the tree grid mode.

Default Value: false
This attribute cannot be modified.

Treegridmodel

String

Determine the treegrid method. It may be nested or adjacency.

Default Value: Nested

This attribute cannot be modified.

Treeicons

Array

The icon used by the tree grid. The default value is {plus: 'ui-icon-triangle-1-e ', minus: 'ui-icon-triang le-1-s', leaf: 'ui-icon-radio-off '}

Default Value: None

This attribute cannot be modified.

Treereader

Array

Extend the colmodel of the grid and add it after the definition of colmodel, which means that the data returned from the server must contain these field values.

Default Value: None

This attribute cannot be modified.

Tree_root_level

Numeric

Treegrid root element level

Default Value: 0

This attribute cannot be modified.

URL

String

The URL of the request.

Default Value: NULL

This attribute can be modified

Userdata

Array

This attribute contains custom information obtained from the request. For example, you do not want to directly display some data in the grid.

Default Value: empty array

This attribute cannot be modified.

Userdataonfooter

Boolean

If it is set to true, the data in userdata is directly displayed in the footer of the grid. The rule is: If userdata contains the same name as the name in colmodel, the value of userdata is displayed in this column. Otherwise, nothing is displayed.

The rules are as follow: If the userdata array contain name which is equal to those of colmodel then the value is placed in that column. if there are, this attribute cannot be modified. Such values, this attribute cannot be modified. Thing is palced.

Default Value: false

This attribute can be modified

Viewrecords

Boolean

Determine whether to display the total number of records.

Default Value: false

This attribute cannot be modified.

Viewsortcols

Array

This parameter is used to define the appearance and behavior of the sort icon that appears near the title.

The composition of the parameter array is as follows: [false, 'vertical ', true]. The first parameter is determined. If all column sorting attributes are true, whether all icons can be seen at the same time. The default value is false, indicating that only the icon of the last sort column is visible.

The second parameter determines the icon position. The possible value is vertical, which indicates that the sorting icon is placed on the other. 'Horizontal 'indicates two icons are placed horizontally.

The third parameter determines the mouse click event function. If it is set to true, it indicates that the title of the clicked column can be sorted; if it is set to false, it indicates that only the icon can be clicked to sort the column.

Note: If the third parameter is set to false, you must set the first parameter to true. Otherwise, the sorting function may be lost.

Default Value: None

This attribute cannot be modified.

Width

Number

Set the grid width. If this attribute is not set, the total width defined in colmodel in each column is used as the width of the grid. If this value is set, the initial width of each column in the grid is determined according to the shrinktofit Parameter definition.

Default Value: None

This attribute cannot be modified. Method avail.

Xmlreader

Array

Description of XML data format. Refer to the description of jsonreader.

Default Value: None

This attribute cannot be modified.

Yufeng technology tutorial network http://www.fengfly.com

Http://www.fengfly.com/plus/view-175780-1.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.