BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
@using Exporting_MVC.Models;
@(Html.EJ().Grid<OrdersView>("PartialGrid")
.Datasource((IEnumerable<OrdersView>)Model)
.AllowPaging()
.Columns(col => {
col.Field(o => o.OrderID).HeaderText("Order ID").Width(70).TextAlign(TextAlign.Right).Add();
. . . .
}))
@(Html.EJ().ScriptManager())
|
public ActionResult LoadGrid()
{
var model = new NorthwindDataContext().OrdersViews.ToList();
return PartialView("_GridPartial", model);
}
|
$.ajax({
url: url, //LoadGrid..
type: 'GET',
success: function (gridResults) {
$('#TestGrid').html(gridResults);
},
error: function (error) {
alert("Error: " + error);
}
});
|
<div id='target'>
<div id='Grid'></div>
<script></script> //Place the content here.
</div>
$.ajax({
. . . .
success: function (e) {
$('#target').find('script').html(e);
}
});
|