jqGrid is a popular jQuery Plugin for displaying and editing data in tabular form. It has some other more sophisticated features, like subgrids, TreeGrids, grouping and so on.
jqGrid was developed originally by Tony Tomov and it was available under MIT/GPL-licenses till the version 4.7.0 published Dec 8, 2014 (see here). Short time after that the license agreement was changed (see here) and new 4.7.1 version was published.
The code from the GitHib repository is the fork of jqGrid 4.7.0 - the latest version available under MIT/GPL-licenses. It will be provided under MIT/GPL-licenses.
Below you can find short description of new features and the bug fixes implemented in free jqGrid 4.14.0 (compared with version 4.13.6). The version is developed by Oleg Kiriljuk, alias Oleg on the stackoverflow and OlegK on trirand forum.
Read Wiki for more detailed information about the features of free-jqGrid. The preliminary version of the documentation can be found here.
Free jqGrid can be used for free. We still ask to contribute the development by donating via PayPal, if one have the possibility for it. One can donate by clicking on the following button or by sending money via PayPal to [email protected] with the comment "free jqGrid". Bank transfer based on the invoice from OK soft GmbH is another option of donating. Just send the email with the information about the amount of donation and you will get the corresponding invoice with the full information about our bank account and our VAT number.
One can install the package with respect of npm by using "npm install free-jqgrid", with respect of bower by using "bower install free-jqgrid" or from NuGet by using "Install-Package free-jqGrid".
The package is published on WebJars too and it's deployed to Maven Central.
Free jqGrid is is available from jsDelivr CDN and cdnjs. Thus one can use it directly from Internet by including for example the URLs like
<link rel="stylesheet" href="https://cdn.jsdelivr.net/free-jqgrid/4.14.0/css/ui.jqgrid.min.css">
<script src="https://cdn.jsdelivr.net/free-jqgrid/4.14.0/js/jquery.jqgrid.min.js"></script>
or
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/free-jqgrid/4.14.0/css/ui.jqgrid.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/free-jqgrid/4.14.0/jquery.jqgrid.min.js"></script>
The locale file is optional. One can, but one don't need to include grid.locale-en.min.js
, because the same information is already included in the jquery.jqgrid.min.js
(or jquery.jqgrid.src.js
).
If somebody want to test the latest version of free jqGrid, one can load it directly from GitHib using RawGit service:
<link rel="stylesheet" href="https://rawgit.com/free-jqgrid/jqGrid/master/css/ui.jqgrid.css">
<script src="https://rawgit.com/free-jqgrid/jqGrid/master/js/jquery.jqgrid.src.js"></script>
All other language files and plugins are available from CDN too. See the wiki article for more details about the usage of free jqGrid from CDNs and RawGit.
Remark: the above URLs will be available after publishing the release of the version of 4.14.0.
- New Boolean property
createColumnIndex: true
incolModel
orgenerateValue: true
ofsearchoptions
oreditoptions
can be used in combination withstype: "select"
oredittype: "select"
. The idea of the new feature come from the old answer. jqGrid can "look through" all values in the column and fill the list of unique value, sort the values and to generate the array of the resulting strings (see the new methodgetUniqueValueFromColumnIndex
). Additionally, jqGrid can generatevalue
property ofsearchoptions
/editoptions
, which can be used bystype: "select"
. The simplest usage of the new feature consist in adding ofstype: "select", searchoptions: { generateValue: true, noFilterText: "Any" }
properties to any column. The demo https://jsfiddle.net/OlegKi/yvbt6w54/ shows the usage of the new feature. It generates the options of<select>
dynamically (the column "tax"). Other columns ("name" and "ship_via") uses jQuery UI Autocomplete and select2 with dynamically generated options. getRowData
,getCell
,getCol
andgetDataFieldOfCell
methods work now with cells/rows, which could be in editing mode (inline editing or cell editing). It solves the old problem. I hope that the new changes allow to simplify the usage of jqGrid.- Add first support of Bootstrap v4 (tested with 4.0.0-alpha.6). The option
guiStyle: "bootstrap4"
can be used now instead ofguiStyle: "bootstrap"
to use jqGrid with Bootstrap v4. Of cause, one have to replace the CSS of Bootstrap 3 to the CSS of Bootstrap 4. - The folder
ts
of free jqGrid incudesfree-jqgrid.d.ts
file with TypeScript type declaration of jqGrid methods, optons and events. The file is created manually. The information could contain some typing errors. Nevertheless. it provides many information, which could be helpful. Some text editors, like free Visual Studio Code, available for Widows, Linux and macOS, can use the type information for IntelliSense. IntelliSense can essental speep up writing of the code and it can be used as context sesitive documentation of free jqGrid options, methods and events. - Free jqGrid supports now editing of rowids in inline editing mode. If one have, for exmple, the column
id
(or with the name, which corresponds tha value ofjsonReader.id
) or some other column, which haskey: true
property, and the column is editable, then the value of rowid should be the same as the value from the cells of the column. Free jqGrid detect now the changes in the column in inline editing mode and changes the rowid after saving the modifications. The new methodchangeRowid
can be used to apply the chanhes of rowid manually. Additionally, jqGrid sends in the case of changing of rowid the value of rowid before the modification as"idOld"
property. The name of the property can be changed usingidold
property ofprmNames
. For example,prmNames: { idold: "orgId"}
options renames"idOld"
property to"orgId"
. - New
saveRowValidation
callback is added to inline editing for the final validation of all decoded data. The problem is that the classic validation viaeditrules
allows to validate a value in the cell, but it dosen't allow to validate relation between the columns. The newsaveRowValidation
callback will be called after all individual fields are processed. Theoptions
parameter of the callback containssavedRow
,newData
and some other properties, which can be helpful to make the final validation of the changes. See the answer and the comment to the commit for more details. - New
sortIconName
callback as the property incolModel
or as the option of jqGrid simplifies building of custom sorting icons. The demo https://jsfiddle.net/OlegKi/ffgg9wdu/ provides an example of the the usage of thesortIconName
callback.
- Move
*.css
and*.min.js
files of plugins in subfolderscss
andmin
. The changes simplifie the usage of jqGrid with SystemJS. One could need to adjust the paths in existing projects. - The module names used in free jqGrid are now the following: "free-jqgrid", "free-jqgrid-plugins", "jquery", "jquery-ui". One should uses paths mapping to map the module identifier to the real path. The demo is an example of the usage SystemJS for loading free jqGrid 4.14.0 modules together with jQuery UI 1.11.4 modules. Another demo uses jQuery UI 1.12.1 modules instead. Probably more typical is loading the whole jQuery UI as one file from CDN like in the next demo. The same works of cause with RequireJS. See the corresponding demo.
- Add support of
customUnaryOperations
option to specify the names ofcustomUnaryOperations
operation which required no data (like"nu"
and"nn"
). See comment to the commit and the answer for more details. - Small Bug fixes in
jqPivot
to allow non-string values be used in aggregators - New
sortIconName
property of colModel or as grid option to simplify building of custom sorting icons - Bug fix the problem with setting attributes on
<select>
, which be built viadataUrl
- Add
saveRowValidation
callback to inline editing to final validation of all decoded data. The usage ofsaveRowValidation
can be changed before publishing of new version. The later changes will allow to return error message, which jqGrid will display to the user. - Add first support of Bootstrap v4. The option
guiStyle: "bootstrap4"
can be used now instead ofguiStyle: "bootstrap"
to use jqGrid with Bootstrap v4 (tested with 4.0.0-alpha.6) instead of Bootstrap 3.x. - Allow to use callback function as the value of the property
label
of the optionyDimension
of the methodjqPivot
- Fixing in cell editing: the
name
propertyof theeditable
callback is changed tocmName
to have the same names in all editing modes - DefinitelyTyped file
free-jqgrid.d.ts
with the type definitions for TypeScript - Bug fixes in the form Delete: remove unneeded
style='white-space:pre;'
inline style, makereloadAfterSubmit: true
working with local grid. The fix is required inloadonce: true
scenario if one usesformDeleting: { reloadGridOptions: { fromServer: true } }
- Bug fix in processing custom buttons in
info_dialog
- Bug fixes of CSS for
nav-button
with the text - Use CSS classes
ui-jqgrid-pg-left
,ui-jqgrid-pg-center
,ui-jqgrid-pg-right
to style the pager parts - Bug fix in testing for empty
ExpandColumn
option - Add parameters to
addfunc
,editfunc
,viewfunc
,delfunc
like it exist already forsearchfunc
- Bug fix of
footerData
metod in case of usage with"get"
parameter - Extend the option of
onShowHideCol
with the options ofshowHideCol
method - Small changes in
saveRow
andeditRow
:rowid
andoptions
parameters are added tosuccessfunc
like is was already before for the eventjqGridInlineSuccessSaveRow
. - Move some part of subgrid initializing from the base module into the subgrid module
- Add new method
changeRowid
, which simplifys changing of rowid in the grid - Add
afterChangeRowid
callback andjqGridAfterChangeRowid
event - Modify
saveRow
to use newchangeRowid
method - Add
defaultValue: false
to default checkboxformatoptions
- Add new
useDefaultValuesOnGrouping: true
option ofgroupingView
- Use
formatoptions.defaultValue
during grouping if formatter is specified. One can change the behavior to old behavior by usaginguseDefaultValuesOnGrouping: false
ingroupingView
option. - Move testing for the existence of
$.fn.sortable
from base module intosortableColumns
method ofgrid.jqueryui.js
to better separate modules - Remove some unused code from
$.jgrid.from
- Improvements in the old code of
addChildNode
- Bug fix of the options of afterChange callback of Searching Dialog, removing some unused parameters and some other minor fixes
- Add new
idold: "idOld"
property inprmNames
, which will be used in inline editing on id changing and remoteediturl
- Send additional parameter
idOld
to the server in case of id changes - Set
this
in theafterClear
callback - Bug fix in usage of
skipSortByX
option of the method jqPivot - Add initial support of boolean
searchoptions.generateValue
property ofstype: "select"
- Add new
inFilterSeparator
parameter, which will be used in multiple select and in "in" operation - Filling of
indexByColumnData
parameter after column templates are expanded - Add new
resetWidthOrg
property ofautoResizing
property ofcolModel
- Filling of
indexByColumnData
parameter after column templates are expanded - Add id and item properties in the editable callback
- Some changes in at the begining of the files: AMD/Node/CommonJS module loading
- Small fix: use empty object (
{}
) asEvent
in case ifsetSelection
was called withundefined
Event
. See the commit for more details. - Fix the visibility in View/Edit forms if formoptions with rowpos,colpos used and some columns are hidden
- Move css and min.js files of plugins in subfolders css and min. The changes simplifie the usage of jqGrid in SystemJS
- Remove some old unused properties of
groupingView
- Add new
isCellEditing
method and changegetRowData
,getCell
,getCol
andgetDataFieldOfCell
to work with editable cells/rows - Amall bug fix: remove the second (duplicate) triggering of
jqGridAfterEditCell
event - Initialize
lastSelectedData
array as copy of data ifloadonce: true
be used withoutforceClientSorting: true
- Remove the second (duplicate) triggering of
jqGridAfterEditCell
event - Small fix in processing of options of the old
excelExport
method. - Apply
autowidth:true
after call ofautoResizeAllColumns
ifautoresizeOnLoad:true
option is used. The changes work espesially good with newresetWidthOrg: true
property ofautoResizing
option. See the issue for more details. - Migrate from google-closure-compiler 20170124 to uglify 2.1.0 because or bugs in minification of module header by closure compiler. See the commit for more detailes.
- Add new method
getUniqueValueFromColumnIndex
to simplify usage ofcreateColumnIndex:true
with jQuery UI Autocomplete - Bug fix in
addRowData
in case of usageidPrefix
with local data - Bug fix processing of
stype:"custom"
in searching dialog and the filter toolbar - Add
sorttype:"boolean"
as the workaround of problems with filtering by Booleanfalse
value - Add
"Y"
and"N"
to possible default values offormatter:"checkbox"
Other old readmes contain the list of the features and bug fixed implemented in previous versions of free jqGrid:
- README4.13.6.md contains the readme of free jqGrid 4.13.6.
- README4.13.5.md contains the readme of free jqGrid 4.13.5.
- README4.13.4.md contains the readme of free jqGrid 4.13.4.
- README4.13.3.md contains the readme of free jqGrid 4.13.3.
- README4.13.2.md contains the readme of free jqGrid 4.13.2.
- README4.13.1.md contains the readme of free jqGrid 4.13.1.
- README4.13.0.md contains the readme of free jqGrid 4.13.0.
- README4.12.1.md contains the readme of free jqGrid 4.12.1.
- README4.12.0.md contains the readme of free jqGrid 4.12.0.
- README4.11.1.md contains the readme of free jqGrid 4.11.1.
- README4.11.0.md contains the readme of free jqGrid 4.11.0.
- README4.10.0.md contains the readme of free jqGrid 4.10.0.
- README492.md contains the readme of free jqGrid 4.9.2.
- README491.md contains the readme of free jqGrid 4.9.1.
- README49.md contains the readme of free jqGrid 4.9.0.
- README48.md contains the readme of free jqGrid 4.8.0.
Many thanks to all, who sent bug reports and suggestions to improve free jqGrid!