Refresh the flexigrid data on dropdown (select) index changed or rebind the flexigrid on index change in javascript or clear the flexigrid data on select change
Asked
Active
Viewed 7,623 times
3 Answers
3
If you're just looking to bind the grid's refresh with another element, you can use
$('#flex1').flexReload()

joedborg
- 17,651
- 32
- 84
- 118
1
I have done the following. On selection change of the Severity, the flexigrid reloads with the data for the selected severity
<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();
}
}
Please mark as answer if it works for you..

ajay swamy
- 271
- 1
- 5