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

DataSource destroy not working ! HELP

0 Answers 95 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gilberto
Top achievements
Rank 1
Gilberto asked on 11 Aug 2012, 08:43 AM
VIEW
.DataSource(dataSource => dataSource
    .Server()
    .Model(model => model.Id(p => p.id))
    .Destroy(excluir => excluir.Action("ExcluirOnOff","Home"))
)


CONTROLLER

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult ExcluirOnOff(int OnOffID)
{
    moneymanagerBDEntities _db = new moneymanagerBDEntities();
    var product = _db.tbl_001.FirstOrDefault(p => p.id == OnOffID);
 
 
    var routeValues = this.GridRouteValues();
     
    if (product != null)
    {
        return RedirectToAction("Index", routeValues);
    }
    return RedirectToAction("Index", routeValues);
}


HELP !

No answers yet. Maybe you can help?

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