2015-10-31 195 views
0

如何将以下rad组合框项目安排到两列中,以便展开不会像现在那样巨大。可能吗?。我希望将列表项目保留在两列分开的列中,并且两列都有复选框。将Telerik radcombox物品安排到两个coloumns中

<telerik:RadComboBox ID="rcmbFormsAndDimensions" runat="server" CheckBoxes="true" Text='<%# Bind("Form_Dimensions") %>' Width="650px" CheckedItemsTexts="DisplayAllInInput"> 
              <Items> 
               <telerik:RadComboBoxItem Text="single pen" /> 
               <telerik:RadComboBoxItem Text="shotgun" /> 
               <telerik:RadComboBoxItem Text="double-shotgun" /> 
               <telerik:RadComboBoxItem Text="camelback" /> 
               <telerik:RadComboBoxItem Text="double pen" /> 
               <telerik:RadComboBoxItem Text="hall-parlor" /> 
               <telerik:RadComboBoxItem Text="saddlebag" /> 
               <telerik:RadComboBoxItem Text="creole cottage" /> 
               <telerik:RadComboBoxItem Text="dog trot" /> 
               <telerik:RadComboBoxItem Text="central-hall" /> 
               <telerik:RadComboBoxItem Text="gable-ell" /> 
               <telerik:RadComboBoxItem Text="bungalow" /> 
               <telerik:RadComboBoxItem Text="pyramidal cottage" /> 
               <telerik:RadComboBoxItem Text="Queen Anne cottage" /> 
               <telerik:RadComboBoxItem Text="central-hall, 2 pile cottage" /> 
               <telerik:RadComboBoxItem Text=" bluffland cottage" /> 
               <telerik:RadComboBoxItem Text="central-hall I-house" /> 
               <telerik:RadComboBoxItem Text="double-pen I-house" /> 
               <telerik:RadComboBoxItem Text="hall-parlor I-house" /> 
               <telerik:RadComboBoxItem Text="Creole house" /> 
               <telerik:RadComboBoxItem Text="central hall, 2 pile house" /> 
               <telerik:RadComboBoxItem Text=" Queen Anne house" /> 
               <telerik:RadComboBoxItem Text="four square" /> 
               <telerik:RadComboBoxItem Text="minimal tradition cottage" /> 
               <telerik:RadComboBoxItem Text="split level" /> 
               <telerik:RadComboBoxItem Text="ranch" /> 
               <telerik:RadComboBoxItem Text="row house" /> 
               <telerik:RadComboBoxItem Text="warehouse" /> 
               <telerik:RadComboBoxItem Text="depot" /> 
               <telerik:RadComboBoxItem Text="skyscraper" /> 
               <telerik:RadComboBoxItem Text=" commercial row bldg." /> 
               <telerik:RadComboBoxItem Text=" freestanding commercial" /> 
               <telerik:RadComboBoxItem Text=" single-crib barn" /> 
               <telerik:RadComboBoxItem Text="transverse-crib barn" /> 
               <telerik:RadComboBoxItem Text="other" />           
               </Items> 
             </telerik:RadComboBox> 

回答

0

您可以使用Telerik放置在他们的网站上的解决方案。这里是link

之后,您可以将其他样式添加到组合框,以获得正确数量的列。

<telerik:RadComboBox ID="rcmbFormsAndDimensions" runat="server" CheckBoxes="true" CssClass="SetComboBoxWidth" CheckedItemsTexts="DisplayAllInInput" DropDownCssClass="multipleRowsColumns"> 

.SetComboBoxWidth{ 
    min-width: 280px; 
} 

Example

上面可以看到该解决方案的一个例子。

0

我不知道你的处境不过这是我做到了从DataSet中取值的ASP页面:

for (int i = 0; i < ds.Tables[0].Rows.Count; i++) 
    { 
    DropDownList1.Items.Add(string.Format("{0:}", ds.Tables[0].Rows[i]["Pnum"])+ 
    spacer + (ds.Tables[0].Rows[i]["Project"]) + spacer + 
    (ds.Tables[0].Rows[i]["Description"])); 
    } 

要查看上面的代码,你可以看看结果在this问题我为别的东西。