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 人气:526
blog comments powered by Disqus


  • netbeans6.8 begin installation of js no plug-ins, is the built-in 2010-04-04

    There are some articles online it seems there is misunderstanding, saying that 6.8 is not installed by default js libraries. In fact, netbeans is automatically parse js libraries, because the Web site, we are certainly put js files in the project director

  • Myeclipse js editing plug-ins, the Chinese do not turn Unicode encoding 2010-08-20

    Plug Description: JSEclipse is free of charge under the Eclipse Javascript Script Editor, the biggest feature is the automatic completion of the js is perfect to support the common point of access DOM objects, such as the document object, screen objects,

  • Js Eclipse, plug-ins, and other mainstream support EXT.JQuery js framework. 2010-12-15

    A relatively easy to use the Eclipse plug-in js, it prompts to support JQuery, Ext js and other mainstream framework.

  • JQuery plug-in aggregate up to 240 plug-ins 2009-11-15

    Overview jQuery is the second prototype was followed by an excellent Javascript framework. Its purpose is to - write less code, do more. It is lightweight js library (compressed only 21k), it is by other than the js library, and it compatible with CSS3, a

  • Proficient in Grails: create custom plug-ins 2010-03-29

    This includes: About ShortenUrl plug-in Creating TinyUrl class Test TinyUrl class Creating IsGd class Creating ShortenUrl Service Package and deploy plug-ins Conclusion Download References In this " Proficient in Grails "Series, Scott Davis show

  • Flex Eclipse plug-ins installed 2010-07-20

    Flex Eclipse plug-ins installed 1. Download eclipse plug-ins package: FB3_WWEJ_Plugin.exe Address: http://trials.adobe.com/Applications/Flex/FlexBuilder/3/FB3_WWEJ_Plugin.exe 2. In any directory to build a following structure of directories: flex_plu

  • The development of a list of browser plug-ins (JS.DIV.CSS) 2009-10-04

    Document Download: IE plug-ins 1, Microsoft JavaScript Debugger (recommended) In debugging under IE open, with this tool can easily debug, VS volume ratio of small, relatively simple function that, but very efficient. http://www.microsoft.com/downloa ...

  • Set the table interlaced display and select the line style plug-ins 2010-09-21

    jquery.altertrstyle.js API: alterTrStyle (options) Set the table interlaced display and select the line style effects, and increase the checkbox and radio selected effect. Return value: jQuery Parameters: options (Map): (optional) set the interlaced displ

  • 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 achiev

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



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

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.422 (s). 14 q(s)