开发者

Wrapping a list of Checkboxes in a Datalist or Repeater

I have a long list of checkboxes bound in a repeater is there a way of wrapping them so instead of having 1 long list wrapping it across 3 or 4 colouns side by side say 7 items long.

Is it easier 开发者_如何学Goto do this with a repeater or a Datalist?

Cheers

Ste


It looks like you need to use one of the repeating controls like the DataList control that has a RepeatDirection property:

MyDataList.RepeatDirection = RepeatDirection.Horizontal

Or, you can play around with the HTML markup in the ItemTemplate of the Repeater control. See here for possible clues on this.


If you truly only need a list of check boxes why not use a CheckBoxList and set the RepeatColumns and RepeatDirection properties.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜