user571874
user571874

Reputation: 589

javascript onDeleted event after deleting row from telerik grid

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

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038810

You could try calling the ajaxRequest method to initiate a refresh of the grid data.

Upvotes: 1

Related Questions