Apr 26, 2018, 11:41 PM
Add parametrs to directEvents
I need pass parametr "id" in Action.
.Width(70)
.Commands(
Html.X().GridCommand()
.CommandName("Edit")
.Icon(Icon.NoteEdit)
.ToolTip(t =>
{
t.Text = "Modifica della ripartizione ferie per giorno";
})
)
.ID("ID")
.DirectEvents(
directEvents =>
{
directEvents.Command.Action = "Details";
})
)
Action controller: // GET: Bob/Details/5
public ActionResult Details(int id)
{
if (id == null)
{
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
}
BobRepository bobRepository = new BobRepository();
Bob bob = bobRepository.GetBob(id);
return View(bob);
}
How i can pass .ID("ID") in Action?