restrict jqgrid from auto-refreshing

2019-09-05 22:41发布

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

enter image description here

Any Help would be great.

1条回答
地球回转人心会变
2楼-- · 2019-09-05 23:31

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

查看更多
登录 后发表回答