This is a migrated thread and some comments may be shown as answers.

[Solved] Refresh ajax grid to the same page

0 Answers 16 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
John
Top achievements
Rank 1
John asked on 11 Oct 2011, 01:38 AM
I have successfully implemented a grid with ajax binding.  I have a column  with an "Edit" button in a client template that loads a Telerik Window which contains a partial view and a  Html.BeginForm for my entity.  Entity is displayed and can be updated and then saved.  All works good.

Q. If I am on page 3, I then view & edit an entity in the popup window and click Save, the entity is saved, and my grid is refreshed, but loads back to page 1.  How do I remember what page I was on, so the grid is refreshed, but on the same page?

The Controller method that perfoms the load and save is:
[GridAction]
public ActionResult LoadBonds()
{
    return View(new GridModel(_service.GetBonds()));
}
 
[HttpPost]
public ActionResult Save(Bond bond)
{
    if (ModelState.IsValid)
    {
        _service.Update(bond);
    }
 
    return RedirectToAction("BondList");
 
}

 

Tags
Grid
Asked by
John
Top achievements
Rank 1
Share this question
or