Reputation: 589
my telerik grid fill via ajax. My delete method:
[HttpPost]
[GridAction]
public ActionResult _AjaxModelDelete(CarModel obj)
{
Model m = dm.GetModelById(obj.Id);
dm.DeleteModel(m);
List<Model> res = dm.GetModelsByVendorId(m.VendorId).ToList();
return View(new GridModel<CarModel>
{
Data = res.Select(x => new CarModel { Id = x.Id, Name = x.Name })
});
}
Grid have client side event onDelete but I need reload grid on event onDeleted. how solve this problem?
Upvotes: 1
Views: 496
Reputation: 1038810
You could try calling the ajaxRequest method to initiate a refresh of the grid data.
Upvotes: 1