刷新下拉列表中的flexigrid数据(select)索引已更改或在javascript中重新绑定flexigrid索引更改或清除选择更改时的flexigrid数据
答案 0 :(得分:3)
如果您只想将网格的刷新与另一个元素绑定,可以使用
$('#flex1').flexReload()
答案 1 :(得分:1)
我做了以下事情。在严重性的选择更改时,flexigrid将使用所选严重性的数据重新加载
<select id='ddlSeverity' onchange="setSeverity($('#ddlSeverity option:selected').attr('value'));">
<option value="1">Severity 1</option>
<option value="2">Severity 2</option>
<option value="3">Severity 3</option>
<option value="4">Severity 4</option>
</select>
$(document).ready(function () {
function setSeverity(severity) {
//Construct the URL to be called.
var urlAction = '@Url.Action("RequestQueueBySeverity", "Home", new { severity = "__BOGUS__" })';
//Replace the bogus parameter with the parameter to be passed
urlAction = urlAction.replace("__BOGUS__", severity);
$('#flex1')
.flexOptions({
url: urlAction,
newp: 1
}).flexReload();
}
}
如果适合您,请标记为答案..
答案 2 :(得分:0)
为了有效重新加载,您可以尝试:
$("#flexigrid")[0].grid.populate()