This question is locked. New answers and comments are not allowed.
I have a grid
<form class="t-grid-actions" method="post" action="/RuleGroupSet/Delete/92b3177f-0989-40fe-b4b3-e478cb1f154d">
<div>
<input type="hidden" value="00000000-0000-0000-0000-000000000000" name="Id">
<button class="t-grid-action t-button t-state-default t-grid-delete" type="submit">Delete</button>
</div>
</form>
The opening form tag is correct and has the correct Id that I want to delete in he post action. the hidden input in the form has the id of the parent object. This either shouldn't be there or should be the correct Id (the one from the post action).
My controller is getting passed the "00000000-0000-0000-0000-000000000000" instead of the "92b3177f-0989-40fe-b4b3-e478cb1f154d"
<%= Html.Telerik().Grid(Model.GroupSets)the delete form that is getting generated looks like this
.Name("GroupSets")
.DataKeys(keys => { keys.Add(p => p.Id); })
.DataBinding(db => db.Server()
.Select("Details", "RuleGroupSet")
.Delete("Delete", "RuleGroupSet"))
.Columns(columns =>
{
columns.Command(commands =>
{
commands.Select().ButtonType(GridButtonType.Text);
if (Roles.IsUserInRole(User.Identity.Name, "Administrator"))
{
commands.Delete().ButtonType(GridButtonType.Text);
}
});
columns.Bound(o => o.RuleSetName);
columns.Bound(o => o.Score);
columns.Bound(o => o.RequiresManualReview);
})
.Filterable()
.ToolBar(toolbar => toolbar.Custom().Text("Add Rule Set").Action("AddRuleGroupSet", "RuleGroup"))
.Sortable()
%>
<form class="t-grid-actions" method="post" action="/RuleGroupSet/Delete/92b3177f-0989-40fe-b4b3-e478cb1f154d">
<div>
<input type="hidden" value="00000000-0000-0000-0000-000000000000" name="Id">
<button class="t-grid-action t-button t-state-default t-grid-delete" type="submit">Delete</button>
</div>
</form>
The opening form tag is correct and has the correct Id that I want to delete in he post action. the hidden input in the form has the id of the parent object. This either shouldn't be there or should be the correct Id (the one from the post action).
My controller is getting passed the "00000000-0000-0000-0000-000000000000" instead of the "92b3177f-0989-40fe-b4b3-e478cb1f154d"