Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Checkbox in a grid shows label?
Message
General information
Forum:
ASP.NET
Category:
WebForms
Miscellaneous
Thread ID:
00776324
Message ID:
00776374
Views:
22
Stephen,

You need to set the Checked property of the Checkbox to the DataBinder expression:
Checked='<%# DataBinder.Eval(Container, "DataItem.Discontinued") %>'
P.S. The less-than symbol shows above as "<". Make sure you use the symbol instead.

>I have a template column :
>{Columns}
>{asp:TemplateColumn HeaderText="Print">
>{ItemTemplate>
>{asp:Checkbox id="chkreleases" Runat="server" /> {%# DataBinder.Eval(Container.DataItem, "ap_noprint") '
>{/asp:Checkbox>
>{/ItemTemplate>
>{/asp:TemplateColumn>
>{asp:BoundColumn DataField="ap_part" HeaderText="PTO Model">
>{ItemStyle Wrap="False">{/ItemStyle>
>{/asp:BoundColumn>
>{/Columns>
>
>I see a checkbox NOT checked and I see the word True' next to it? How do I get a check to apear in the checkbox and NO translation of the BIT into English?
>
>TIA
>
>__Stephen
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform