<script type="text/x-jsrender" id="pagerTemplate"> <div class="e-pagercontainer" style="border-radius:0px"> <button id="refreshbutton" style="text-align:center; border:none;width:90px;height:20px">refresh button</button> </div> <div class="e-pagercontainer" style="border-radius:0px"> <select id="ShipCountry" name="ShipCountry" style="text-align:center; border:none;width:90px;height:20px"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option>
</select> </div> </script> @(Html.EJ().Grid<SyncfusionMvcApplication39.OrdersView>("FlatGrid") .Datasource((IEnumerable<object>)ViewBag.datasource) .AllowScrolling() .AllowPaging() /*Paging Enabled*/ .PageSettings(page => page.EnableTemplates().Template("#pagerTemplate").ShowDefaults()) .Columns(col => { col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).TextAlign(TextAlign.Right).Width(75).Add(); col.Field("CustomerID").HeaderText("Customer ID").Width(80).Add(); col.Field("EmployeeID").HeaderText("Employee ID").TextAlign(TextAlign.Right).Width(75).Add(); col.Field("ShipCity").HeaderText("Ship City").Width(110).Add(); col.Field("ShipName").HeaderText("Ship Name").Width(170).Add();
}).ClientSideEvents(eve=>eve.ActionComplete("complete").DataBound("db"))) <script type="text/javascript"> function db(args){
$("#refreshbutton").ejButton({click:function(args){ var obj = $("#FlatGrid").ejGrid("instance"); obj.refreshContent(true); alert("gridrefreshed") } }); $('#ShipCountry').ejDropDownList( {
value: "1", change: function (args) { /*Do your changes */ var gridObj = $("#FlatGrid").data("ejGrid"); var val = args.value; gridObj.gotoPage(val); } }); } function complete(args) { $(".e-pagercontainer").eq(1).css('border-style', 'none'); $("#ShipCountry").ejDropDownList({ width: '110px',height:'25px' }); } |
Jayaprakash K.
<script type="text/x-jsrender" id="pagerTemplate"> <div><div class="e-pagercontainer" style="border-radius:0px;float:left"> <button id="refreshbutton" style="text-align:center; border:none;width:90px;height:20px">refresh button</button> </div> <label style="float:left;padding:2px">PageCount</label> <div class="e-pagercontainer" style="border-radius:0px;float:right"> <select id="ShipCountry" name="ShipCountry" style="text-align:center; border:none;width:90px;height:20px"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option>
</select> </div> <label style="float:right;padding:2px">PageSize</label> <div class="e-pagercontainer" style="border-radius:0px;float:right"> <select id="ShipCountry1" name="ShipCountry" style="text-align:center; border:none;width:90px;height:20px"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option>
</select> </div> </div> |
Hi Ayane,
Thanks for the update.
Please get back to us if you need any further assistance.
Regards,
Jayaprakash K.