asp.net - How to change the table layout when using datalist? -


how change table layout when using datalist. below aspx using populate data, result shown in example 1. there not continuation of showing data due table layout ? how can achieve show result shown in example 2 ?

i in need of using datalist since using repeatcolumn not available in repeater.

enter image description here

aspx :

<asp:datalist id="dl_groups" repeatcolumns="2"  runat="server"      onitemdatabound="dl_groups_itemdatabound" repeatdirection="vertical"      showfooter="false" showheader="false">     <itemtemplate>        <asp:checkbox runat="server" id="chk_group" text='<%# eval("category_type") %>'              value='<%# eval("service_type_category_id") %>' onclick="ongroupclick" />        <asp:checkboxlist runat="server" id="chkservicetype" style="padding-left: 20px"              datavaluefield="servicetypeid" datatextfield="name" enableviewstate="true">        </asp:checkboxlist>        <br />     </itemtemplate> </asp:datalist> 

have gone through these properties of checkboxlist

  repeatcolumns="2"   repeatdirection="vertical"   repeatlayout="table" 

these may helpful you.

you may take benefit of css
follows

#chkservicetype tr{ display:inline-block; margin-right:20px; } ​  #chkservicetype tr label{ margin-left:5px; } 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -