|
@(Html.EJ().Grid<object>("ResourcesGrid")
//.Datasource(ds => ds.URL(Url.Action("ResourcesDataSource", "Resource", new { requestSource = "home" })).Adaptor(AdaptorType.UrlAdaptor))
.AllowSorting()
.AllowFiltering()
.AllowPaging()
.PageSettings(p => p.PageSize(25))
.AllowResizeToFit()
.IsResponsive()
.ClientSideEvents(eve => eve.DataBound("dataBound").ActionBegin("actionBegin").RowSelected("rowSelected")))
<script>
$("#cutareButon").click(function () {
$("#ResourcesGrid").ejGrid("dataSource", new ej.DataManager({
url: "Resource/ResourcesDataSource",
adaptor: new ej.UrlAdaptor()
}))
});
</script> |
Unfortunately, it doesn't work.
It gives me this error:
jquery-3.3.1.js:3827 Uncaught ejGrid: methods/properties can be accessed only after plugin creation
Error: ejGrid: methods/properties can be accessed only after plugin creation
at t.throwError (http://localhost:16253/Scripts/ej/web/ej.web.all.min.js:10:30074)
at jQuery.fn.init.n.fn.(anonymous function) [as ejGrid] (http://localhost:16253/Scripts/ej/web/ej.web.all.min.js:10:23796)
at HTMLDocument.<anonymous> (http://localhost:16253/Scripts/Home/index.js:3:26)
at mightThrow (http://localhost:16253/Scripts/jquery-3.3.1.js:3534:29)
at process (http://localhost:16253/Scripts/jquery-3.3.1.js:3602:12)