I am facing the problem in binding the child gird with custom ajax call. I am not getting any error, but my sub grid is not showing any data.
@(Html.EJ().Grid<object>("FlatGrid")
. . .
.ChildGrid(child =>
{
child.Datasource(ds=> ds.Adaptor(AdaptorType.UrlAdaptor).URL("DataSource"))
.QueryString("EmployeeID")
.AllowPaging()
. . .
})
)
[Controller]
public ActionResult DataSource(Syncfusion.JavaScript.DataManager dm)
{
IEnumerable DataSource = OrderRepository.GetAllRecords().ToList();
DataResult result = new DataResult();
DataOperations obj = new DataOperations();
if(dm.Where != null)
{
//Filter based on the querystring
DataSource = obj.PerformWhereFilter(DataSource, dm.Where, dm.Where[0].Operator);
}
result.count = DataSource.AsQueryable().Count();
if (dm.Skip != 0)
{
DataSource = obj.PerformSkip(DataSource, dm.Skip);
}
if (dm.Take != 0)
{
DataSource = obj.PerformTake(DataSource, dm.Take);
}
result.result = DataSource;
return Json(result, JsonRequestBehavior.AllowGet);
} |
@(Html.EJ().Grid<object>("FlatGrid")
. . .
.ClientSideEvents(e=>e.DetailsExpand("onDetailsExpand"))
)
function onDetailsExpand(args){
setTimeout(function(){
//Ajax post back
},1000)
debugger
} |
@(Html.EJ().Grid<object>("FlatGrid")
. . .
.ClientSideEvents(e=>e.DetailsExpand("onDetailsExpand"))
)
function onDetailsExpand(args){
setTimeout(function(){
//Ajax post back
},100)
} |
@(Html.EJ().Grid<object>("FlatGrid")
. . .
.ChildGrid(child =>
{
. . .
.ClientSideEvents(e=>e.DataBound("onDataBound"))
})
)
<script type="text/javascript">
function onDataBound(e) {
//Do ajax post-back action here
}
</script> |