restrict jqgrid from auto-refreshing

允我心安 提交于 2019-12-24 22:06:31

问题


I am using struts2-jquery-jqgrid. I am having filterSearch on the grid. Here in filter I have a drop-down list on column Assigned To containing the list of users, and based on the users,data can be filtered.

Problem Scenario:

When I select an option from drop-down list data is filtered successfully but after that jqgrid is automatically getting refreshed. So, again I can not get the filtered data in the grid.

My grid is

    <sjg:grid
            id="gridtable"
            caption="Issue-Summary"
            dataType="json"
            href="%{remoteurl}"
            pager="true"
            gridModel="finalGridModel"
            rowList="20,25,30"
            rowNum="20"
            rownumbers="true"
            width="1260" 
            filter="true"
            filterOptions="{stringResult :true,
                            searchOnEnter : true,
                            enableClear : true,
**// Update Section**       autosearch:'false' //this solved my problem
                           }"   
        >
            <sjg:gridColumn name="assigned_to"   index="assigned_user" key="assigned_user" title="Assigned To" searchtype="select"
              searchoptions="{defaultSearch:'cn', dataUrl : '%{fillUser}', 
              dataEvents: [{ type: 'change', fn: function(elem) { myfunction(elem)}}]}"/>
       </sjg:grid>

Snapshot of my grid

Any Help would be great.


回答1:


ok I made it working,just I had to add autosearch:'false' plese check the updated section



来源:https://stackoverflow.com/questions/15005307/restrict-jqgrid-from-auto-refreshing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!