Reputation: 4031
I am using telerik grid for mvc with ajax custom binding and its running ok, but the problem is when i apply the grouping it sends it ruins the grid.
The client side code looks like
colums.Bound(o => o.TO).Title("To").Groupable(false).HtmlAttributes(new { style = "text-align:center" }).Width(150);
colums.Bound(o => o.CanChange).Hidden(true);
colums.Bound(o => o.PlanHospitalID).Hidden(true).HtmlAttributes(new { @class = "planhospital" });
if ((Model.GeoLocationType == SalesEnum.Region.ToString()))
{
colums.Bound(o => o.RMAcompanies).Groupable(false).Title("Join(RM)").ClientTemplate("<input class='rmjoin' name='RMID' type='checkbox' value='" + Model.DesignationID + "' <#=RMAcompanies? checked='checked' : '' #> <#=CanChange? '' : disabled='disabled' #> /><input type='hidden' name='PlanHospitalID' value='<#= PlanHospitalID#>'/>");
}
colums.Bound(o => o.SMCanChange).Hidden(true);
if (Model.GeoLocationType == SalesEnum.Zone.ToString())
{
colums.Bound(o => o.SMAcompanies).Title("Join(SM)").Groupable(false).ClientTemplate("<input class='smjoin' type='checkbox' name='SMID' value='" + Model.DesignationID + "' <#= SMAcompanies?checked='checked':'' #> <#=SMCanChange? '' : disabled='disabled' #> /><input type='hidden' name='PlanHospitalID' value='<#=PlanHospitalID#>'/>");
}
colums.Bound(o => o.Participants).Groupable(false);
Upvotes: 2
Views: 339
Reputation: 11
I hava been in the trouble for several days. I got the cause now...
For the ajax controller, you must: 1--retrieve and send back all the data, not only the pagesize; 2--return the View(model) not the json format.
Hope it can help you out.
Upvotes: 1