Guriddo » All Posts https://guriddo.net/?forum=bugs&feed=rss2 Thu, 30 Oct 2025 02:26:01 +0000 https://bbpress.org/?v=2.6.14 en-US https://guriddo.net/?topic=problem-when-using-multiselect-with-celledit-after-upgrade-to-4-7#post-103833 <![CDATA[Reply To: Problem when using multiselect with cellEdit after upgrade to 4.7]]> https://guriddo.net/?topic=problem-when-using-multiselect-with-celledit-after-upgrade-to-4-7#post-103833 Tue, 16 Dec 2014 08:09:29 +0000 tony Thanks Oleg,
It seems correct.

Will merge the fix.

Kind Regards
Tony Tomov

]]>
https://guriddo.net/?topic=problem-when-using-multiselect-with-celledit-after-upgrade-to-4-7#post-103809 <![CDATA[Reply To: Problem when using multiselect with cellEdit after upgrade to 4.7]]> https://guriddo.net/?topic=problem-when-using-multiselect-with-celledit-after-upgrade-to-4-7#post-103809 Mon, 15 Dec 2014 14:03:44 +0000 OlegK It’s a bug. One needs include return; line after the line of jqGrid code (see here). You can get the fixed version of jquery.jqGrid.src.js here.

Best regards
Oleg

]]>
https://guriddo.net/?topic=problem-when-using-multiselect-with-celledit-after-upgrade-to-4-7#post-103791 <![CDATA[Problem when using multiselect with cellEdit after upgrade to 4.7]]> https://guriddo.net/?topic=problem-when-using-multiselect-with-celledit-after-upgrade-to-4-7#post-103791 Mon, 15 Dec 2014 09:36:38 +0000 0xFF Hello,

After upgrade from 4.6 to jqGrid 4.7, I found there is problem with multiselect option when cellEdit is enabled.

I Can’t select row by checkbox clicking. Nothing happens. To select I have to click few pixels out of the checkbox picture.

Select all checkbox works fine.

]]>
https://guriddo.net/?topic=strange-behaviour-after-updating-to-jqgrid-4-7-0#post-103789 <![CDATA[Reply To: Strange behaviour after updating to jqGrid 4.7.0]]> https://guriddo.net/?topic=strange-behaviour-after-updating-to-jqgrid-4-7-0#post-103789 Mon, 15 Dec 2014 09:30:35 +0000 OlegK Hello Tony,

I posted the pull request which contains the changes in addJSONData and normalizeData required to fix problem with the usage key:true in combination with the reader (jsonReader or localReader) having repeatitems:true.

Here is the modified version of jquery.jqGrid.src.js.

The problem come after you changed old keyIndex option to keyName. It was done to fix problem with non-updated keyIndex option after resorting columns in jqGrid (by usage columnChooser or drag and drop of column headers in case of the usage sortable:true).

I hope that I tested all possible cases.

Best regards
Oleg

]]>
https://guriddo.net/?topic=strange-behaviour-after-updating-to-jqgrid-4-7-0#post-103787 <![CDATA[Reply To: Strange behaviour after updating to jqGrid 4.7.0]]> https://guriddo.net/?topic=strange-behaviour-after-updating-to-jqgrid-4-7-0#post-103787 Mon, 15 Dec 2014 09:29:08 +0000 mdp I’ll use the formatter: “select” and change the stored procedures to return the ids. I also will use the workaround till the bug is fixed.

By the way, by inspecting your code I found I’m setting some properties that aren’t needed as sorttype:text and index.

Thanks for your help Oleg!

]]>
https://guriddo.net/?topic=strange-behaviour-after-updating-to-jqgrid-4-7-0#post-103785 <![CDATA[Reply To: Strange behaviour after updating to jqGrid 4.7.0]]> https://guriddo.net/?topic=strange-behaviour-after-updating-to-jqgrid-4-7-0#post-103785 Mon, 15 Dec 2014 09:28:05 +0000 OlegK Hi,

usage of demos simplify all. The reason of the problem with sending wrong idCity – the rowids of the grid will be wrong assigned. It’s a bug in jqGrid. The bug exists in combination of the usage of arrays of strings as the input value of row like [“13570″,”Some name 1″,”Australia”] and the usage of key:true property in colModel. I will post later to github my suggestion how to fix the problem. As the workaround I suggest you to add jsonReader : {id: 0} option and remove key:true property from the first column definition.

See http://jsfiddle.net/OlegKi/d26hzhu6/3/

About the problem with the requirement to post idCity=3 instead of the text “Australia” I wrote you two times before. You used wrong configuration which worked in old versions of jqGrid, but the but are fixed some years ago (probably in the version 4.4.5). So you should decide whether you want that jqGrid hold values like 1,2,3 in idCity column (and displays still the texts “London”, “Washington”, “Australia”) or you use the texts “London”, “Washington”, “Australia” in the data. In the first case you the communication with the server will be in ids 1,2,3, but the values have to be used in both input of grid and the output. Exactly the example I used in the modified demo. Alternatively you can fill jqGrid with the data like “London”, “Washington”, “Australia”, but exactly the same data will be send to the server during editing.

You still can use serializeEditData to remap any standard values like “London”, “Washington”, “Australia” to 1,2,3 or on the contrary, but I don’t recommend you to do so because I personally find such kind on communication transfer non-consequent.

Best regards
Oleg

]]>
https://guriddo.net/?topic=strange-behaviour-after-updating-to-jqgrid-4-7-0#post-103783 <![CDATA[Reply To: Strange behaviour after updating to jqGrid 4.7.0]]> https://guriddo.net/?topic=strange-behaviour-after-updating-to-jqgrid-4-7-0#post-103783 Mon, 15 Dec 2014 09:27:18 +0000 mdp Here’s the jsfiddle for the issue with prmNames (I removed the hidden:true property for column idPer. In edit form the value is displayed correctly, after saving is replaced by the number of the row):

http://jsfiddle.net/d26hzhu6/2/

Notice that if you remove the property id: “idPer” in prmNames this problem is fixed.

Also the same code works correctly in v4.4.4, as you can see in the fiddler used below.

Regarding the issue with the combos:

I was using version 4.4.4. I know it may sound strange, but it was working as I previously explained without formatter:’select’:

I retrieve from the DB the text “Australia” for the field “idCity”. When opening the edit form, jqgrid will match the text to positionate the combo. After successfull submit (which post idCity=3) the text “Australia” would appear in the grid instead of the value 3.

Here’s the jsfiddle using v.4.4.4 exposing the behaviour I mentioned above:

http://jsfiddle.net/Lgy7ae3h/1/

After comparing the code in formedit I found that in version 4.4.5 some code was removed that provided that functionality (all related to a var name “expost”). I also found the commit of that change:

https://github.com/tonytomov/jqGrid/commit/edb5073b6bd617878221674d201cba060489241c

Now, how can I update my code to make it work as before but using the new version?. I have more than 20 grids and I would try to avoid to change the stored procedures.

]]>
https://guriddo.net/?topic=strange-behaviour-after-updating-to-jqgrid-4-7-0#post-103673 <![CDATA[Reply To: Strange behaviour after updating to jqGrid 4.7.0]]> https://guriddo.net/?topic=strange-behaviour-after-updating-to-jqgrid-4-7-0#post-103673 Fri, 12 Dec 2014 12:12:45 +0000 OlegK If you have an interest to prepare the jsfiddle demo which uses Ajax you can use http://jsfiddle.net/OlegKi/ntfw57zm/ as an example.

I can repeat that I think that you use wrong value editoptions:{ value:”1:London;2:Washington;3:Australia”}. You use “Australia” and “Washington” in the input data. So you don’t use ids in the input data. It means that editoptions:{ value:”London:London;Washington:Washington;Australia:Australia”} will be correct.

If you do want to use ids in the idCity column you should use [[“13570″,”Some name 1″,”3”],[“34233″,”Some name2″,”Washington”]] and

In the way the data will hold only ids in idCity column but display texts. formatter:’select’ do the mapping. Because you use prmNames: {id: “idPer”, …} no hidden idPer column is required.

Best regards
Oleg

]]>
https://guriddo.net/?topic=strange-behaviour-after-updating-to-jqgrid-4-7-0#post-103672 <![CDATA[Reply To: Strange behaviour after updating to jqGrid 4.7.0]]> https://guriddo.net/?topic=strange-behaviour-after-updating-to-jqgrid-4-7-0#post-103672 Fri, 12 Dec 2014 12:11:45 +0000 mdp Here’s the jsfiddle:

http://jsfiddle.net/d26hzhu6/

The only thing that is missing is the Ajax response. I found the following example, but I don’t know how to use it to replace the Ajax call in jqgrid:

new Request.JSONP({
   url: ‘http://jsfiddle.net/echo/jsonp/&#8217;,
   data: {
       text: ‘some text’,
       par1: ‘another text’
   },
   onSuccess: function(response) {
       show_response(response, $(‘post’));
   }
}).send();

]]>
https://guriddo.net/?topic=strange-behaviour-after-updating-to-jqgrid-4-7-0#post-103671 <![CDATA[Reply To: Strange behaviour after updating to jqGrid 4.7.0]]> https://guriddo.net/?topic=strange-behaviour-after-updating-to-jqgrid-4-7-0#post-103671 Fri, 12 Dec 2014 12:11:11 +0000 mdp Thanks for your response. I’ve never used jsfiddle and I don’t know how to simulate ajax requests (apparently only POST is supported and I’m using GET). Anyway here’s a small demo:

HTML Body:

   <div>
      <table id=”sampleGrid”><tr><td></td></tr></table>
      <div id=”pagerSampleGrid”></div>  Â
   </div>

Javascript:

   //<![CDATA[
       $(document).ready(function () {          Â
           setjqGridSettings();
           setGridRequirentes();          Â
       });

  Â
function setjqGridSettings()
{Â Â Â
   $.extend($.jgrid.defaults,
   {
      mtype:”POST”,                   Â
      datatype: ‘json’,
      ajaxGridOptions: { contentType: “application/json; charset=utf-8” },  Â
      viewrecords: true,
      loadonce: true,
      gridview: true,
      scrollOffset: 0,
      autowidth: true,
      ignoreCase: true,
      jsonReader : {
          root: “d.rows”,
          page: “d.page”,
          total: “d.total”,
          records: “d.records”,
          cell: “”},
      ajaxSelectOptions: { type: “GET”, contentType: ‘application/json; charset=utf-8’ }
   });

   $.extend($.jgrid.edit,
   {
      ajaxEditOptions: { contentType: “application/json; charset=utf-8″ },
      closeAfterEdit: true,
      closeAfterAdd: true,
      closeOnEscape: false,
      reloadAfterSubmit: false,
      jqModal: false
   });  Â
}Â Â Â
  Â
function setGridRequirentes()
{Â Â Â
   var modSettings =
   {
      width: 440,
      url: ‘myUrl.aspx’,
      serializeEditData: function(postData) {        Â
         console.log(postData)
      }     Â
   };

   var sampleData = [
           {idPer:”13570″, person:”some name 1″,idCity:”Washington”},
           {idPer:”34233″, person:”some name 2″,idCity:”Australia”},
       ];         Â
        Â
   $(“#sampleGrid”).jqGrid({      Â
       //datatype:’local’,
       //data: sampleData,
      url: “MyPage.aspx/getPeople”,  Â
      mtype: “GET”,      Â
      prmNames: {id: “idPer”, search:null, nd : null, page: null, rows: null, sort : null, order : null}, Â
      colNames:[‘idPer’, ‘person’, ‘idCity’], Â
      colModel:[
         {name:’idPer’,index:’idPer’, hidden: true, key: true, width:55, editable:true, editrules:{edithidden:false}, sorttype:’int’},
         {name:’person’,index:’person’, editable:true, editoptions:{size:39}, width:190, sorttype:’text’},
         {name:’idCity’,index:’idCity’, editable:true, edittype:’select’,
            editoptions:{ value:”1:London;2:Washington;3:Australia”},width:90, sorttype:’text’}],
      rowNum:5,
      rowList:[5,10,15,20],
      pager: ‘#pagerSampleGrid’,  Â
      caption:”Sample Grid”     Â
   });  Â
Â
   $(“#sampleGrid”).jqGrid(‘navGrid’,’#pagerSampleGrid’,{edit:true,add:true,del:false,search:false,refresh:false},modSettings);
}
   //]]>

Â

The response from my web service getPeople is (I’m using the format suggested in jqGrid demos “Data Mapping”->”Data Optimization” to reduce the size of the response):

2","Washington"]]}}

In serializeEditData I only get the number of the row instead of the "idPer" value as can be seen in the console.
Also note that after saving (gives an error since the webservice is not found) for example Australia is replaced by 3.

Thanks for your help

]]>