Hello guys,
I have the following checkboxes in my gridview:
<asp:TemplateField HeaderText="Active">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Active")%>
<asp:CheckBox ID="Active" runat="server"/>
</ItemTemplate>
</asp:TemplateField>
And it working very fine. I'm populating it with a bool value. The problem is that its showing the string text in the gridview, like:
True [x] False [ ] True [x]
and so long... I would like to show just the checkboxes. I tried this in the rowDataBound event:
if (result.Active)
{
((CheckBox)e.Row.FindControl("Active")).Checked = true;
((CheckBox)e.Row.FindControl("Active")).Text = string.Empty;
}
But its not working. There is a way?
Thanks,
Pedro Dusso