Hi Stevan,
Thanks for your interest in Syncfusion Products.
Your requirement can be achieved by handling OnActionBegin event and set the control value to grid arguments. Please refer the below code snippet.
[View]
<%using (Html.BeginForm("Index","Home"))
{%>
<%=Html.CheckBox("Check",true) %>
<% =Html.Syncfusion().Grid<object>("Grid2")
.Datasource((IEnumerable)ViewData["Griddata2"])
.EnablePaging()
.EnableSorting()
.AutoFormat(Skins.Sandune).EnableGrouping().ClientSideEvents(events => { events.OnActionBegin("OnActionBegin"); })
%>
<% } %>
[Controller]
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Index(PagingParams args, bool Check)
{
//Check is the checkbox state
var data1 = new NorthwindDataContext().Employees.Take(50).ToList();
ViewData["Griddata2"] = data1;
return data1.GridActions();
}
[Javascript]
function OnActionBegin(sender, args)
{
//Check box state
var check = $('#Check')[0].checked;
args.data["Check"] = check;
}
For your convenience, we have created sample and the same can be downloaded from the following link.
GridPartial1085540280.zipPlease let me know if you have any other questions or concerns.
Regards,
Sridhar.N