There is CheckBoxList with items:
<asp:CheckBoxList ID="RadCheckBoxList1" runat="server" RepeatDirection="Horizontal"
RepeatLayout="Flow">
<Items>
<asp:ListItem Text="" Value="1" />
<asp:ListItem Text="" Value="2" />
<asp:ListItem Text="" Value="3" />
</Items>
</asp:CheckBoxList>
When it is bind in C# code:
BitArray ba = new BitArray(3);
ba[0] = false;
ba[1] = true;
ba[2] = false;
cbl.DataSource = ba;
cbl.DataBind();
I expected: to see just marked checkboxes with no text
but instead the result is: Boolean values went to label texts
I no need a label text. Just need to set checkbox mark by Boolean value from BitArray item. If it is matter there are about 600 CheckBoxList controls with about 20 checkboxes in each. So making separate class would slow down performance of web page. What is the property name of BitArray items to bind it CheckBoxList or how efficiently bind it?
Edit: Thanks to combatc2 by setting
cb1.DataTextFormatString = " ";
I get rid of label texts but checkboxes still are not correctly set. Instead of correctly setting "checked" property:
<input name="cbl3$1" id="cbl3_1" type="checkbox" value="">
<input name="cbl3$0" id="cbl3_0" type="checkbox" checked="checked" value="">
it is wrongly set "value" property:
<input name="cbl2$0" id="cbl2_0" type="checkbox" value="False">
<input name="cbl2$1" id="cbl2_1" type="checkbox" value="True">