jqGrid Form plug-in source code overview

As jQuery form plugin, jqGrid I think is the best, the article has some good reading foundation jqGrid

For everyone reading this article one, two notes for themselves, if error, please let us know!

Open jqGrid the src folder following

Css is the style sheet

I18n localization files are

The following is the main js files

jqGrid Form plug-in source code overview

First, non-jqGrid own

jqDnR.js Drag'n'Resize drag and stretch

jquery.searchFilter.js query

jquery.fmatter.js format

JsonXml.js xml conversion json, pure js, non-jquery plugin

jqModal.js mask layer, jquery plugin

Second, jqGrid basic js

grid.base.js structure:

1): jquery extension to a jqrid function $. Extend ($. Jgrid ,{}), use, such as $. Jgrid.htmlDecode (value)

2): the main production of plug-ins (80 rows around) $. Fn.jqGrid = function (pin) ()

Mainly includes:

1, sorting can sort sortable in the decision by the colModel

2, subGrid

3, ondblClickRow function (rowid) ()

4, onRightClickRow function (rowid) ()

5, onSelectRow function (rowid) ()

6, multiselect multiple choice, default false

7, treeGrid

8, toolbar, customizable toolbar

9, scroll to this and rowlist [] mutually exclusive, when the scroll is true when, rowlist [] an immediate value will be set to rowlist [] initial null value

10, rownumbers automatically generate client-side serial number

The main functional areas in the statement of around 377 lines to 1169 lines around the end of the main features are included in the code

About 1195 lines to 1219 lines declare the default xmlReader and jsonReader structure parameters can be set jqGrid changes, such as: jsonReader: (repeatitems: true, cell: "cell", id: "keyid")

1124 lines to 1250 lines grid structure around the table first, and about 1250 lines to 1351 lines for the header of the function of binding

3): Opening of the API interface (near line 1619) $. Jgrid.extend (())

Main API interface getGridParam and setGridParam, you can get or set the parameters

getGridParam methods:

getGridParam ("url") the current url from options array for the current AJAX 's URL

getGridParam ("sortname") the name of last sorted column to sort the field

getGridParam ("sortorder") the last sorted order sort order

getGridParam ("selrow") the id of the selected row, null if row is not selected very useful, get selected row ID

getGridParam ("page") the current page number. the current page

getGridParam ("rowNum") the current number of requested rows present the number of places

getGridParam ("datatype") the current datatype. get the current datatype

getGridParam ("records") the current number of records in grid. are the total number of records

getGridParam ("selarrrow") array of id's of the selected rows when multiselect options is

true. Empty array if not selection. can be multiple choice, the return selected row ID

setGridParam methods:

setGridParam ((url: newvalue)) Parameters: url - string Set a new url, replacing the older.

Can set a grid of the ajax url, be compatible with the trigger ("reloadGrid") to use

setGridParam ((sortname: newvalue)) Parameters: sortname - string Set a new sort name

Set sort field

setGridParam ((sortorder: newvalue)) Parameters: sortorder - string (asc or desc) Set a new sort order

Set the sort order asc or desc

setGridParam ((page: newvalue)) Parameters: page - integer> 0 Set a new page number

Turn to the first few pages set

setGridParam ((rowNum: newvalue)) Parameters: rownum - integer> 0 Set a new number of requested rows.

Set the current number of rows per page

setGridParam ((datatype: newvalue)) Parameters: datatype-string xml, json.xmlstring, jsonstring, clientSide) Set a new datatype.

Set up a new datatype (xml, json)

grid.loader.js jqGrid load all the necessary components, This file should be used if you want to debug, if you need to load the debug on

grid.formedit.js and form-related to add, delete, modify, view, refresh, query, FormToGrid, GridToForm so, the file extensions more

3, jqGrid colModel allocation table structure

align left, center, right

detefmt date: true

editable flase

editoptions edittype a prerequisite, this is the value, []

editrules edit specification

edittype text, textarea, select, checkbox, password



hidedlg false (appear in the modal dialog)

hidden false if hidden columns in the loading

index used for ranking the most convenient is to set a database field

jsonmap statement json format

key false

When not set colNames label when used in the bar at this place, this also is empty, is the name instead of

name the necessary attributes of a unique identifier, such as pop-up editform form, will serve as the input of the name attribute

resizable true, the column width can be adjusted

search true

sortable true

sorttype text, int, float, date

width 150

xmlmap statement format xml

-------------------------------------------------- -------------------------------------------------- ----------------------------

Another: When the grid is not to table structure, so a div, it will go wrong

分类:Web 时间:2010-08-05 人气:632
blog comments powered by Disqus


  • Using JS to control the page calls a different style sheet 2009-03-17

    Studied some time ago to use JS to control page changes automatically when the browser calls the different styles of questions, ideally in the blue today, they also see a similar code, special excerpt down for later use. SetAttribute method used to a

  • jQuery framework + cookie select the style sheet file [switch] 2010-12-12

    HTML: DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Transitional / / EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv=&quo

  • jQuery instance of the CSS style sheet dynamically select the [transfer] 2010-12-12

    jQuery instance of the CSS style sheet dynamically select the instance that's still the main jquery selectors, Jquery css on some knowledge of a similar $ ("Li"). Css ("cursor", "pointer"); Such a way to determine the specifi

  • The introduction of the style sheet issues 2010-05-27

    A CSS style sheet was wrong even let me debug the night, Kuangyun in. Have been prepared to write tonight, the background ExtJS, because reload after the machine is not the ExtJS files, so back down from an official website. As a general process to s

  • XML content according to the XSL style sheet set (reproduced) 2010-08-17

    Use Extensible Stylesheet Language Transformations (Extensible Stylesheet Language Transformation (XSLT)) usually is the XML data from one form into another form of the most convenient method because it gives you great flexibility, without applicatio

  • Default style sheet for HTML 4 2014-09-16

    This appendix is informative, not normative. This style sheet describes the typical formatting of all HTML 4 ([HTML4]) elements based on extensive research into current UA practice. Developers are encouraged to use it as a default style sheet in thei

  • 向当前style sheet中插入一个新的style实现方法 2015-01-22

    今天为了临时解决页面样式问题,为了方便,直接在这个公共的js里面向style sheet插入新的style rule,感兴趣的朋友可以出纳卡下哈 很少会插入一个新的style rule,今天为了临时解决页面样式问题,需要更新很多页面的一些样式,这些页面都引用了一个公共的js,为了方便,直接在这个公共的js里面向style sheet插入新的style rule. 先看代码: /** * Add a stylesheet rule to the document (may be better pr

  • Using XSL style sheet can not view XML input 2010-04-01

    The following error: Using XSL style sheet can not view XML input. Please correct the error and then click the Refresh button, or try again later. Name with an invalid character. Processing resources 'http://localhost/cms/Default.aspx' error. Line 1,

  • cascading style sheet 2.0 handbook 2010-05-03

    cascading style sheet 2.0 handbook

  • JS in the CSS Style tag table 2010-06-01

    JS in the CSS Style tag table Posted by Kevin | Filed under HTML / CSS / JS | 2009-02-12 Js will be used writing, if you find yourself not achieved the desired effect, while the program is no problem, then it corresponds to the light see next tab und

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 闽ICP备15018612号

processed in 0.070 (s). 13 q(s)