Does anyone have an idea how to keep check box check status when changed page?
I added check box as a ( ClientTemplate) column, user can check or uncheck them. but check box's value was removed after page moving. How to keep those status? Thanks in advance.
1 Answer, 1 is accepted
0
Georgi Denchev
Telerik team
answered on 11 Jan 2021, 12:32 PM
Hi Zhihong,
Generally speaking if the checkbox is connected to a Property in your model, it should not be editable unless you are in edit mode. You can use the ClientTemplate to visually display a checkbox instead of true/false in your column, but in order to change the value(check/uncheck) you should edit the underlying data itself. Your client template could be something similar to this:
public ActionResult Update([DataSourceRequest] DataSourceRequest request, MyModel model)
{
return Json(new[] { model }.ToDataSourceResult(request));
}
If you are trying to do checkbox row selection, please have a look at the following demo.
Let me know if you have any questions.
Best Regards,
Georgi Denchev
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.