Contents
jqGrid ......................................................................................................................................... 1
Acknowledgements ................................................................................................................... 1
What's New in This Release? .......................................................................................................... 3
Version 3.3 .............................................................................................................................. 3
Version 3.2.2............................................................................................................................ 5
Version 3.2.1............................................................................................................................ 7
Version 3.2 .............................................................................................................................. 7
Version 3.1 ............................................................................................................................ 10
Introduction .............................................................................................................................. 11
Requirements ......................................................................................................................... 11
Do I need to Pay for jqGrid? ..................................................................................................... 12
Installation ............................................................................................................................. 12
How it Works .......................................................................................................................... 14
Tutorial: Creating Your First Grid .................................................................................................. 17
The Data................................................................................................................................ 17
The HTML .............................................................................................................................. 17
The Server-side File ................................................................................................................ 20
PHP and MySQL ...................................................................................................................... 21
COOP Example ....................................................................................................................... 23
Data Types ................................................................................................................................ 25
XML Data ............................................................................................................................... 26
XML String ............................................................................................................................. 30
JSON Data ............................................................................................................................. 30
JSON String ........................................................................................................................... 35
Array Data ............................................................................................................................. 35
Function ................................................................................................................................ 37
User Data .............................................................................................................................. 38
Basic Grid.................................................................................................................................. 40
Properties .............................................................................................................................. 41
colModel Properties ................................................................................................................. 45
Height and Width .................................................................................................................... 47
Obsolete Properties ................................................................................................................. 48
Events ................................................................................................................................... 49
Methods................................................................................................................................. 51
Available methods (as of version 3.2) ........................................................................................ 51
Advanced Methods .................................................................................................................. 55
Obsolete Methods ................................................................................................................... 56
Pager (Navigation bar) ................................................................................................................ 57
Properties .............................................................................................................................. 57
Events ................................................................................................................................... 58
Methods................................................................................................................................. 58
Custom Buttons ...................................................................................................................... 58
Form Editing .............................................................................................................................. 61
Properties .............................................................................................................................. 61
Searching - Single Field ........................................................................................................... 61
Searching - Multiple Fields ....................................................................................................... 63
Add Row ................................................................................................................................ 66
Edit Row ................................................................................................................................ 66
Delete Row ............................................................................................................................ 69
Inline Editing ............................................................................................................................. 72
Properties .............................................................................................................................. 72
Methods................................................................................................................................. 74
Example ................................................................................................................................ 76