0

hi iam use editurl: 'clientArray', in jqgrid but see this error: plase see pic error.how sloved this problem see pic error But when they edit, it should not call server.So i tried 'ClientArray' But still it shows Url is not set alert box how sloved this problem

 myGrid.jqGrid({
                            pager: myPager, data: col[cols], datatype: 'local',
                            editurl: 'clientArray',
                            },
                            jsonReader: {
                                root: "Rows",
                                page: "Page",
                                total: "Total",
                                records: "Records",
                                repeatitems: true,
                                userdata: "UserData",
                                id: "Id",
                                cell: "RowCells"
                            },


                            cmTemplate: { editable: false, autoResizable: true },
                             loadonce: true,
                            shrinkToFit: true,

                            autoencode: true,

                        })
                        .navGrid( '#' + $(myPager)[0].id ,

                  { add: false, del: false, edit: false, search: false }   

                  )
                           .jqGrid('inlineNav', '#' + $(myPager)[0].id ,
                         {
                             // cloneToTop: true,
                             edit: false, add: true, save: false, cancel: false,
                             edittext: "ویرایش", addtext: "جدید", savetext: "ذخیره", canceltext: "لغو",

                             addParams: {
                                 position: "last",
                                 rowID: '0',
                                 useDefValues: true,
                                 addRowParams:  getInlineNavParams(true) 
                             },
                             //editParams: getInlineNavParams(false)
                         }

                         );

                        myGrid.jqGrid('filterToolbar', {
                            stringResult: true,//// وجود این سطر سبب می‌شود تا اپراتورها به سرور ارسال شوند
                            enableClear: false,
                            searchOnEnter: true,
                            searchOperators: true, // فعال سازی منوی اپراتورها
                            defaultSearch: "cn"

                        });
  • Which **version** of jqGrid you use and from which **fork** of jqGrid ([free jqGrid](https://github.com/free-jqgrid/jqGrid), commercial [Guriddo jqGrid JS](http://guriddo.net/?page_id=103334) or an old jqGrid in version <=4.7)? When you get the error: during adding of new row or during editing? You use `getInlineNavParams` function, which code you didn't post, to construct `addRowParams` option. In general, The usage `editurl: 'clientArray'` is correct. Could you prepare the demo (in jsfiddle, for example), which reproduce the problem? – Oleg Oct 16 '17 at 08:45
  • im use @license jqGrid 4.6.0 - jQuery Grid –  Oct 16 '17 at 08:58
  • 1
    What do `getInlineNavParams` function? If it would return `url` property, then `editurl: 'clientArray'` will be ignored. Could you prepare **the demo**, which reproduce the problem? By the way jqGrid 4.6 is 3.5 years old. I'd recommend you to try to upgrade to free jqGrid 4.15.1. You can try it by changing URLs, from which you load jqGrid to: `https://cdnjs.cloudflare.com/ajax/libs/free-jqgrid/4.15.1/css/ui.jqgrid.min.css`, `https://cdnjs.cloudflare.com/ajax/libs/free-jqgrid/4.15.1/i18n/min/grid.locale-fa.js`, `https://cdnjs.cloudflare.com/ajax/libs/free-jqgrid/4.15.1/jquery.jqgrid.min.js`. – Oleg Oct 16 '17 at 09:14
  • iam use jqGrid 4.15.1 dont show icon edit save,.. –  Oct 16 '17 at 09:40
  • iam use ver 4.15.1 is slove problem thnaks –  Oct 16 '17 at 13:04
  • 1
    You are welcome! I'd recommend you to read [the page](https://free-jqgrid.github.io/getting-started/index.html) too because you could reduce the code which you use and make it better readable if you'd migrate to free jqGrid. – Oleg Oct 16 '17 at 13:06

1 Answers1

0

The usage of editurl: 'clientArray' is correct. I'd recommend you to try to upgrade to free jqGrid 4.15.1 - it's the fork of jqGrid, which I develop after the main fork are made commercial and renamed to Guriddo jqGrid JS.

To test free jqGrid you can load jqGrid files directly from CDN:

https://cdnjs.cloudflare.com/ajax/libs/free-jqgrid/4.15.1/cs‌​s/ui.jqgrid.min.css
https://cdnjs.cloudflare.com/ajax/libs/free-jqgrid/4.15.1/i1‌​8n/min/grid.locale-f‌​a.js
https://cdnjs.cloudflare.com/ajax/libs/free-jqgrid/4.15.1/jq‌​uery.jqgrid.min.js

See the wiki article for more details.

Oleg
  • 220,925
  • 34
  • 403
  • 798