0

hey guys basicaly passing a datatable to populate an asp:checkboxlist & i have the choice of horizontal or vertical. is there any other way i can do this to make several rows of these?
say, 5 across or place in a div or panel with width constraints that will make these wrap as they are populated?
i've pretty much tried everything to no avail.
thx for any help
rik

Private Sub fillCheckboxes(ByVal myDt As DataTable)
        Ck.DataSource = myDt.DefaultView
        Ck.DataValueField = "dbColumn"
        Ck.DataTextField = "display"
        Ck.DataBind()


    End Sub

Edited by __avd: Added [code] tags.

1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by rikb53
0

i think i figure this out myself. i put this in a panel to set the background color. then simply set the repeat columns in the code behind.

Ck.DataSource = myDt.DefaultView
        Ck.DataValueField = "dbColumn"
        Ck.DataTextField = "display"
        Ck.DataBind()
        Ck.RepeatColumns = 6

it defaults to repeat layout table & this will define how wide i want it. works good for me. thx rik

Edited by __avd: Added [code] tags.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.