This question is locked. New answers and comments are not allowed.
Hi,
I am new in MVC razor and facing below problem
I have used radgrid on my view as given below and binded it with my Model . there is a column Publish which is bool type and returns true/false value, currenty this column displays as checkbox in disable form so I am not able to check/uncheck this checkbox. I want to dispaly this column as editable checkbox and on check/uncheck this checkbox need to call an Action.
I have already tried to convert it into TemplateColumn but I did not get expected result.
@{Html.Telerik().Grid<Sampling>(Model) .Name("TaskList") .DataKeys(keys => keys.Add(k => k.SamplingId)) .HtmlAttributes(new { @Style = "width : float; height : float;"}) .HtmlAttributes(new { @Style = "align:center; font-size:12px;" }) .Columns(columns => { columns.Bound(o => o.SamplingName).Width(45).Title("Sampling Name (Id)"); columns.Bound(o => o.Category).Width(110).Title("Category (Id)"); columns.Bound(o => o.CDMAttribute).Width(75).Title("CDM Attribute (Id)"); columns.Bound(o => o.SampleSize).Width(29); columns.Bound(o => o.AttributeSource).Width(42).Title("Sampling Source"); columns.Bound(o => o.IncludeChildCategories).Width(38).Title("Included Child"); columns.Bound(o => o.SamplingStatus).Width(30).Title("Status"); columns.Bound(o => o.TargetPrecision).Width(20).Format("{0:N}").Title("TP (%)"); columns.Bound(o => o.ActualPrecision).Width(20).Format("{0:N}").Title("AP (%)"); columns.Bound(o => o.DateCreated).Width(30).Title("Created on").Format("{0:MM/dd/yyyy}"); columns.Bound(o => o.Publish).Width(25); }) .DataBinding(dataBinding => { dataBinding.Ajax().Select("Index", "SamplingManager") .Enabled(true); dataBinding.Server().Select("Index", "SamplingManager", new { ajax = ViewData["ajax"] }); } ) .Pageable(page => page.PageSize(10).Style(GridPagerStyles.NextPreviousAndNumeric).Position(GridPagerPosition.Bottom)) .Sortable() .Footer(true) .Scrollable(scroll => scroll.Enabled(true)) .NoRecordsTemplate("No records to display") .Render(); }