限制jqgrid自动刷新 [英] restrict jqgrid from auto-refreshing
问题描述
我正在使用 struts2-jquery-jqgrid .我在网格上有 filterSearch .在过滤器中,我在分配给列上有一个下拉列表,其中包含用户列表,并且可以根据用户过滤数据.
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.
问题场景:
当我从下拉列表中选择一个选项时,数据将被成功过滤,但之后 jqgrid会自动刷新.因此,再次无法在网格中获取过滤后的数据.
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.
我的网格是
<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>
我的网格快照
任何帮助都很好.
推荐答案
好,我可以正常使用,只需要添加 autosearch:'false' 请检查更新的部分
ok I made it working,just I had to add autosearch:'false' plese check the updated section
这篇关于限制jqgrid自动刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!