I'm using checklistbox. I want to list all items like that
But there 2 selection in repeatdirection. Only horizontal and vertical.
Here is my code:
<asp:CheckBoxList runat="server" RepeatDirection="Horizontal">
<asp:ListItem Text=" Monday "></asp:ListItem>
<asp:ListItem Text=" Tuesday "></asp:ListItem>
<asp:ListItem Text=" Wednesday "></asp:ListItem>
<asp:ListItem Text=" Thursday "></asp:ListItem>
<asp:ListItem Text=" Friday "></asp:ListItem>
<asp:ListItem Text=" Saturday "></asp:ListItem>
<asp:ListItem Text=" Sunday "></asp:ListItem>
</asp:CheckBoxList>
So I mean that half vertical and half horizontal. When row is full other items will be in next row.
How can I do that?
you can use this RepeatDirection
, RepeatColumns
, and RepeatLayout
:
<asp:CheckBoxList RepeatDirection="Horizontal"
RepeatColumns="2" RepeatLayout="Table" ...>
check more about property here : CheckBoxList Properties