search - jqGrid filtertoolbar not firing after grid resizing -


i have fixed row numbers 10 subgrids, if reccount less 10 want adjust height subgrid "auto" or "100%".

so here code subgrid :

//  subgrid fourth level var subgrid_table_id = subgrid_id+"_d",     pager_id = "p_"+subgrid_table_id;  $("#"+subgrid_id).append("<table id='"+subgrid_table_id+"' class='scroll'></table><div id='"+pager_id+"' class='scroll'></div>");  $("#"+subgrid_table_id).jqgrid({      url:"sg31b.php?id="+row_id+"&clt="+clt,      datatype: "json",      idprefix:"sgd_",     colnames: ['id','article','désignation','marque','equivalence'],     colmodel: [          {name:'e.id',index:'e.id',hidden:true},          {name:'a.code',index:'a.code', width:100},          {name:'a.descr',index:'a.descr', width:450},          {name:'k.code',index:'k.code', width:80},          {name:'e.equiv',index:'e.equiv',width:100}     ],      pager: pager_id,      sortname: 'a.code',      hiddengrid:true,     scroll:true,     height:230,     rownum:10,     autowidth:true,     caption:'4 - equivalence articles',     gridcomplete:function(){         sortdatacol(this);         if($("#"+subgrid_id+"_d").jqgrid('getgridparam','records') < $("#"+subgrid_id+"_d").jqgrid('getgridparam','rownum')){             $("#"+subgrid_id+"_d").jqgrid('setgridheight','100%');         }else{             $("#"+subgrid_id+"_d").jqgrid('setgridparam',[{npage:1}]).jqgrid('setgridheight',230);         }     } });  $("#"+subgrid_table_id).jqgrid('navgrid',"#"+pager_id,{search:false,add:false,edit:false,del:false}); $("#"+subgrid_table_id).jqgrid('filtertoolbar',{stringresult: true,searchonenter : false}); fullinputcss(); 

and snapshot of result less 10 filtered rows : enter image description here

now if press backspace in search field obtain more rows, seems search doesn't fire because firebug doesn't show trace of request : enter image description here

if delete added 'setgridheight' lines in gridcomplete, runs fine ! think 1 more time i'm wrong in coding , understanding how jqgrid runs. please give me way solve trouble ? many in advance. have nice day. jihel

i suppose origin of problem id duplicates on page. wrote the answer on question described problem detailed.

current implementation of jqgrid (version 4.4.5) has problem in code of filtertoolbar constructs id input fields of filter toolbar based on following rule:

id="gs_" + cm.name

(see the line of code). means id of input field column a.code gs_a.code for every subgrid use. can have id duplicates.

so recommend redesign naming concept in code. can use example

name: row_id + "a_code", index: "a.code" 

in way value "a.code" still send during sorting of grid, have no id duplicates. in scenarios (is use repeatitems: false in jsonreader) need use additional jsonmap attribute, don't need in current code.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -