This is a migrated thread and some comments may be shown as answers.

[Solved] RadGrids - Is there a way to show a string value in a bit column?

1 Answer 117 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Brett
Top achievements
Rank 1
Brett asked on 11 Sep 2009, 04:53 PM
I have a RadGrid and I am pulling several columns.  In one of the columns, it displays a checkbox.  True for checked and false for unchecked.  Is there a way to display yes for checked or true as opposed to a checked box?  Thanks!

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 12 Sep 2009, 04:33 AM
Hi Brett,

One suggestion is by placing Label inside GridTemplateColumn and set the Label Text according to the column value. (I guess you have not set the the AutoGeneratedColumn property to True).

ASPX:
 
 . . .  
<telerik:GridTemplateColumn> 
    <ItemTemplate> 
        <asp:Label ID="Label1" runat="server" Text='<%# Convert.ToBoolean(Eval("MartalStatus")) == true ? "True" : "False" %>'></asp:Label> 
    </ItemTemplate> 
</telerik:GridTemplateColumn> 
 . . . 

Feel free to share the comments,
Shinu.
Tags
General Discussions
Asked by
Brett
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or