<input type="text" id="fieldone" name="fname">
<input type="text" id="fieldtwo" name="lname">
<button onclick="myFunction()">Select</button>
<ejs-grid id="Grid" allowPaging="true" dataBound="dataBound" load="onLoad" toolbar="@(new List<string>() {"Add", "Edit", "Update", "Delete" })">
<e-data-manager url="/Home/UrlDataSource" adaptor="UrlAdaptor" insertUrl="/Home/Insert" updateUrl="/Home/Update" removeUrl="/Home/Remove"></e-data-manager>
<e-grid-editSettings allowAdding="true" allowDeleting="true" allowEditing="true" mode="Normal"></e-grid-editSettings>
<e-grid-columns>
. . . . . .
</e-grid-columns>
</ejs-grid>
<script>
function myFunction() {
var grid = document.getElementById("Grid").ej2_instances[0];
grid.query = new ej.data.Query().addParams('transactor', parseInt(document.getElementById('fieldone').value)).addParams('currency', parseInt(document.getElementById('fieldtwo').value)); //set your additional parameters value to the Grid query it will pass the values to the controller. Based on that value you can return the result it will refresh the Grid.
}
</script>
|