This question is locked. New answers and comments are not allowed.
Hello everyone!
I have a boolean column in my Grid. What I want to do is have a command that toggles the value of this column and causes a post back to persist the changes. What I would normally do without Telerik Grid would be something like this:
So basically when the page is rendered, if the value of Approved column in the current entity is true, the button would read 'Disapprove' and clicking that would post back to the Disapprove action and do changes in the database. The other way around works in a similar way.
My question is how can I implement a similar functionality using Telerik Grid ?
Any help would be appreciated.
I have a boolean column in my Grid. What I want to do is have a command that toggles the value of this column and causes a post back to persist the changes. What I would normally do without Telerik Grid would be something like this:
<table> <tr> ... <th> Approved </th> </tr>@foreach (var item in Model) { <tr> ... <td> @if (item.Approved) { using (Html.BeginForm("Disapprove", "MyController", new { id = item.Id })) { @Html.AntiForgeryToken(); <input type="submit" value="Disapprove" /> } } else { using (Html.BeginForm("Approve", "MyController", new { id = item.Id })) { @Html.AntiForgeryToken(); <input type="submit" value="Approve" /> } } <td> </tr>}</table>So basically when the page is rendered, if the value of Approved column in the current entity is true, the button would read 'Disapprove' and clicking that would post back to the Disapprove action and do changes in the database. The other way around works in a similar way.
My question is how can I implement a similar functionality using Telerik Grid ?
Any help would be appreciated.