PDA

View Full Version : Rad Grid


coderapp
07-19-2007, 05:22 PM
I am using Rad grid in my application, 2 of the fields have Y/N input in database with datatype char.
I want to display them in the grid as check boxes.
The datatype the checkboxes need is int....
how to i convert the char datatype to int and where.
Can i do it in aspx or should be done in pageload of aspx.cs
I couldnt access the column fields in aspx.cs, its not recognizing the radgrid columns.

<radG:GridCheckBoxColumn DataField="IsActive" HeaderText="IsActive" SortExpression="IsActive"
UniqueName="isactive" >
</radG:GridCheckBoxColumn >

Thanks for any help.

coderapp
07-19-2007, 07:32 PM
got it solved

used

<radG:GridTemplateColumn UniqueName="TemplateColumn" DataField="IsLink" HeaderText="IsLink" SortExpression="IsLink" >
<ItemTemplate>
<asp:CheckBox ID="chkisLink" Enabled=false runat="server" Checked='<%# DataBinder.Eval(Container.DataItem,"IsLink").Equals("Y")?true:false %>' />

</ItemTemplate>
</radG:GridTemplateColumn>