Displaying Bit Value as CheckBox in Telerik Grid

I have a Telerik grid that is displayed a list of users. In my database, I have a bit field that determines if a user is priority or not. I am having an issue displaying it as a checkmark in Telerik window. It always come up as a drop down. I was able to get it to display as textbox; however, this option does not allow the user to manually group according to priority. The second way that I tried is failed and saying that 'CS1660: Cannot convert lambda expression to type 'string' because it is not a delegate type' see sample code below.

//the below example works fine, but it won't allow the user to sort. The automatic sort option is not available since it is an template.
 @* columns.Template(
              @<text> 
                    <input type="checkbox" name="prioprity" id="chkPriority" @(item.Users.PriorityUser == true ? "checked" : "unchecked") disabled="disabled"/> 
                </text>)
            .Width(60)
            .Title("Priority User");*@

 //The below example should  allow sorting. However, it throwing an exception 'CS1660: Cannot convert lambda expression to type 'string' because it is not a delegate type'

columns.Bound(x => x.Users.PriorityUser).Width(50)
            .ClientTemplate(
             @<text>
                <input type='checkbox' name='prioprity' id='chkPriority' @(item.User.PriorityUser == true ? "checked" : "unchecked")  disabled='disabled'/>
             </text>
            ).Title("Priority User")

//This attempt displays the data, but it is showing as a dropdown. 

columns.Bound(x => x.Users.PriorityUser).Width(50)
                .ClientTemplate("<input type='checkbox' name='prioprity' id='chkPriority'@(item.Users.PriorityUser == true ? 'checked' : 'unchecked')  disabled='disabled'/>"
                ).Title("Priority User");

Any help or suggestions would be greatly appreciated.

Answers


The issue has been resolved. columns.Bound(x => x.Users.PriorityUser).Width(50) works just fine after I deleted the .edmx file and recreated it. Previously, I was simply doing an update from database to update the .edmx file.


Need Your Help

Reading the local password policy programmatically

windows security winapi

Are there Windows API functions that allows reading what the current password policy is? For instance, minimum length, complexity etc.

Android: Error while adding the xml files to another xml

android layout-inflater

Error while adding/Inflating the xml files to another xml