Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki:howto_grid_base [2009/10/31 12:22] tony |
wiki:howto_grid_base [2017/12/12 17:12] (current) admin |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Allow FireFox to work with RTL (Right To Left) laguaages ====== | + | ====== HOW TO jqGrid common solutions ====== |
- | jqGrid support fully FireFox versions 3.x and Internet Explorer versions >=6. | + | |
+ | ==== Allow FireFox to work with RTL (Right To Left) languages ==== | ||
+ | |||
+ | jqGrid fully supports RTL in FireFox versions 3.x and Internet Explorer versions >=6 | ||
The default settings in FireFox are not compatible with RTL. In order to change this: | The default settings in FireFox are not compatible with RTL. In order to change this: | ||
- In the url bar in FireFox type about:config and confirm the alert dialog. | - In the url bar in FireFox type about:config and confirm the alert dialog. | ||
- In the Find bar type layout.scrollbar.side | - In the Find bar type layout.scrollbar.side | ||
- Double click on it and change the value from 0 to 1 | - Double click on it and change the value from 0 to 1 | ||
+ | <note>RTL support is available from version 3.6 and up</note> | ||
- | ======= Configuring jqGrid to use only the new API ===== | + | ==== Configuring jqGrid to use only the new API ==== |
This should be done in the installation procedure following these steps: | This should be done in the installation procedure following these steps: | ||
<code html> | <code html> | ||
Line 13: | Line 17: | ||
<head> | <head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
+ | <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<title>My First Grid</title> | <title>My First Grid</title> | ||
| | ||
Line 38: | Line 43: | ||
</code> | </code> | ||
This line should be after the language file and before the jqGrid JS file | This line should be after the language file and before the jqGrid JS file | ||
+ | <note>New jqGrid API is available from version 3.6 and up</note> | ||
+ | ==== Client side sorting, but server side paging ==== | ||
+ | In order to have this we should define two events in the grid - loadComplete and onPaging. Below is the code how can be this achieved | ||
+ | <code javascript> | ||
+ | jQuery("#gridid").jqGrid({ | ||
+ | ... | ||
+ | datatype: 'json', // can be xml | ||
+ | loadComplete : function () { | ||
+ | jQuery("#gridid").jqGrid('setGridParam',{datatype:'local'}); | ||
+ | }, | ||
+ | onPaging : function(which_button) { | ||
+ | jQuery("#gridid").jqGrid('setGridParam',{datatype:'json'}); | ||
+ | }, | ||
+ | ... | ||
+ | }); | ||
+ | </code> | ||
+ | In order local sorting to work properly a sorttype parameter in colModel should be set |