This question is locked. New answers and comments are not allowed.
Hi,
Here is my grid:
@( Html.Telerik().Grid(Model)
.Name("PatronGrid")
.DataBinding(d => d.Ajax().Select("_AjaxBinding", "Home"))
.Columns(columns =>
{
columns.Add(p => p.ID)
.Format(Html.ActionLink("Select", "Detail",new { Id = "{0}" }, null).ToString())
.Encoded(false)
.Title("Select");
columns.Bound(p => p.LastName);
columns.Bound(p => p.Active)
.ClientTemplate("<input type='checkbox' name='chkActive' value='<#= Active #>' />")
.Title("Active")
.Width(50)
.HtmlAttributes(new { style = "text-align:center" });
columns.Bound(p => p.Active);
columns.Bound(p => p.CreatedDate).Format("{0:MM/dd/yyyy}")
.HtmlAttributes(new { style = "text-align:center;" });
})
.Pageable(pager => pager.PageSize(5))
.Sortable()
.NoRecordsTemplate("<p style='padding:10px'>Enter an Account or Name to search by, leave blank to display all records.")
)
The ACTIVE data element is defined as a BOOLEAN.
My Question:
When I initially load the page everything looks nice. When I sort the grid or page it, the checkbox disappears and the words "false" and "true" appear instead in only the BOUND column ( columns.Bound(p => p.Active). The TemplateColumn does not do this. Just wondered why - its been driving me crazy for several days. I have your MVC3 Telerik.Web.MVC.dll dated 4/14/2011
Thanks so much..
Here is my grid:
@( Html.Telerik().Grid(Model)
.Name("PatronGrid")
.DataBinding(d => d.Ajax().Select("_AjaxBinding", "Home"))
.Columns(columns =>
{
columns.Add(p => p.ID)
.Format(Html.ActionLink("Select", "Detail",new { Id = "{0}" }, null).ToString())
.Encoded(false)
.Title("Select");
columns.Bound(p => p.LastName);
columns.Bound(p => p.Active)
.ClientTemplate("<input type='checkbox' name='chkActive' value='<#= Active #>' />")
.Title("Active")
.Width(50)
.HtmlAttributes(new { style = "text-align:center" });
columns.Bound(p => p.Active);
columns.Bound(p => p.CreatedDate).Format("{0:MM/dd/yyyy}")
.HtmlAttributes(new { style = "text-align:center;" });
})
.Pageable(pager => pager.PageSize(5))
.Sortable()
.NoRecordsTemplate("<p style='padding:10px'>Enter an Account or Name to search by, leave blank to display all records.")
)
The ACTIVE data element is defined as a BOOLEAN.
My Question:
When I initially load the page everything looks nice. When I sort the grid or page it, the checkbox disappears and the words "false" and "true" appear instead in only the BOUND column ( columns.Bound(p => p.Active). The TemplateColumn does not do this. Just wondered why - its been driving me crazy for several days. I have your MVC3 Telerik.Web.MVC.dll dated 4/14/2011
Thanks so much..