简体   繁体   English

我如何用破折号或类似的东西分隔组合框的项目

[英]How can I divide the items of a combo box with a dash or something similar

I have a RadComboBox that wraps the items if they are longer than the width of the combo box so my combo box would show something like this: 我有一个RadComboBox,如果项目长于组合框的宽度,则可以包装它们,因此我的组合框将显示如下内容:

All
White T Shirts
Black T Shirts
Blue T Shirts With
Images
Green T Shirts

So as you can see Blue T Shirts With Images wraps, which is good this what I want... But now i received a request that this althought it is what they want to see, they would like to see it separated like with a dash underline like this: 因此,正如您所看到的,带有图像包裹的蓝色T恤衫,这对我想要的东西很好。但是现在我收到了一个请求,尽管这是他们想要的东西,但是他们希望看到它像破折号一样分开强调如下:

All
--------------------
White T Shirts
--------------------
Black T Shirts
--------------------
Blue T Shirts With
Images
--------------------
Green T Shirts
--------------------

So this what they would like to see or something similar, maybe even like something on the side like 所以这就是他们想要看到的东西或类似的东西,甚至像侧面的东西

* All
* White T Shirts
* Black T Shirts
* Blue T Shirts With
  Images
* Green T Shirts

I am not sure how to do this and would appreciate any help as to how to do this.. Right now this is my mark up of the drop down 我不确定如何执行此操作,将不胜感激如何执行此操作。.现在,这是我对下拉菜单的标记

 <telerik:RadComboBox ID="ddlTShirts" runat="server">
 </telerik:RadComboBox>

try to Change the items template of the control. 尝试更改控件的项目模板。

<telerik:RadComboBox ID="RadComboBox1" runat="server">
    <ItemTemplate>
           <asp:CheckBox runat="server" ID="chk1" Checked="true"/>
            <asp:Label runat="server" ID="Label1" AssociatedControlID="chk1">
                <img src='...' />
            </asp:Label>            
    </ItemTemplate>
</telerik:RadComboBox>

Reference: http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/templates/defaultcs.aspx 参考: http : //demos.telerik.com/aspnet-ajax/combobox/examples/functionality/templates/defaultcs.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM