|
@Html.EJS().Grid("Grid").DataBound("dataBound").DataSource((IEnumerable<object>)ViewBag.dataSource).AllowFiltering().Columns(col =>
{
...
}).AllowPaging().Render()
<script>
function dataBound(args) {
var gridObj = document.getElementById("Grid").ej2_instances[0]; //to get the instance of grid
var gridEle = document.getElementById("Grid"); //Here Grid is the ID of the grid.
// var gridEle = gridObj.element; //another way to get the grid element.
}
</script> |
|
var data = new ej.data.DataManager({
url: '/Home/UrlDatasource',
crossDomain: true,
adaptor:'UrlAdaptor'
});
|