This is a migrated thread and some comments may be shown as answers.

Text Wrap, line highlight issue in template

1 Answer 73 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Jeff Reinhardt
Top achievements
Rank 1
Jeff Reinhardt asked on 10 Aug 2010, 05:48 PM
I have a templated combo showing Product Title, System, and Cost.

<
telerik:RadComboBox ID="radcmbProduct" runat="server" Width="400px" Height="200px" AllowCustomText="false" EmptyMessage="Select a Product" EnableLoadOnDemand="True" ShowMoreResultsBox="true" EnableVirtualScrolling="true" HighlightTemplatedItems="true" MarkFirstMatch="true" NoWrap="true" OnItemsRequested="radcmbProduct_ItemsRequested" OnItemDataBound="radcmbProduct_ItemDataBound">
   <HeaderTemplate>
         <ul>
            <li class="col1">Title</li>
            <li class="col2">System</li>
            <li class="col3">Price</li>
         </ul>
   </HeaderTemplate>
   <ItemTemplate>
         <ul>
            <li class="col1">
               <%# DataBinder.Eval(Container.DataItem, "Title") %></li>
            <li class="col2">
               <%# DataBinder.Eval(Container.DataItem, "GameSystemName") %></li>
            <li class="col3">
               <%# DataBinder.Eval(Container.DataItem, "Cost") %></li>
         </ul>
   </ItemTemplate>
</telerik:RadComboBox>

The Product Title is going to be longer than I can fit ,  I have tried turning NoWrap off and Cost end up on the next line but I am having enough issues with the highlighting that I turned it back on.  Here is the CSS:

.col1

 

, .col2, .col3

 

{

 

float: left;

 

 

width: 100px;

 

 

margin: 0;

 

 

padding: 0 5px 0 0;

 

 

line-height: 14px;

 

}


I want to get the highlighting and perhaps the text wrapping to work together so it looks good.  Here is what it looks like now (see attachment)

I am not sure what is missing but it will not highlight based on the template and even if I turn nowrap on as it is, the highlight line is way above where the mouse is, etc.

1 Answer, 1 is accepted

Sort by
0
Jeff Reinhardt
Top achievements
Rank 1
answered on 10 Aug 2010, 06:03 PM
Ok ignore my first post, I had a CSS issue and have fixed it and added the DropDownWidth setting to straighten out my data....  the real problem is highlighting.

I have HighlightTemplatedItems="true"

but look at the image attached to this post.

the mouse is way below and the highlight line is very thin and not where it should be.
Tags
ComboBox
Asked by
Jeff Reinhardt
Top achievements
Rank 1
Answers by
Jeff Reinhardt
Top achievements
Rank 1
Share this question
or