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

combobox template display in IE & FF problem

2 Answers 36 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Khanh
Top achievements
Rank 1
Khanh asked on 05 Sep 2008, 01:52 PM
Hi all,

A little problem here.  How it should: Dropdown values displays "Fish" and "Water".  Upon selection, the combobox should display either "F" or "W".
The following code works correctly in Firefox.  In IE7, the dropdown is correct but the display is not.
<telerik:RadComboBox ID="Entity" runat="server" MarkFirstMatch="true" Width="50px" 
         TabIndex="1" AutoPostBack="false" DropDownWidth="70px" MaxLength="1" 
         EnableLoadOnDemand="false" 
         Height="50px" AllowCustomText="false" ShowMoreResultsBox="False"  
         HighlightTemplatedItems="true"
         <ItemTemplate> 
            <div> 
               <%#DataBinder.Eval(Container, "Text")%> 
             </div> 
         </ItemTemplate> 
         <Items> 
            <telerik:RadComboBoxItem runat="server" Text="Fish" Value="F" /> 
            <telerik:RadComboBoxItem runat="server" Text="Water" Value="W" /> 
          </Items> 
</telerik:RadComboBox> 

Thanks,
Khanh

2 Answers, 1 is accepted

Sort by
0
Accepted
Khanh
Top achievements
Rank 1
answered on 05 Sep 2008, 02:24 PM
I solved it by adding an Attributes.  If anyone is interested here it is:
<telerik:RadComboBox ID="Entity" runat="server" MarkFirstMatch="true" Width="50px"  
                    TabIndex="1" AutoPostBack="false" DropDownWidth="70px" MaxLength="1" EnableLoadOnDemand="false" 
                    Height="50px" AllowCustomText="false" ShowMoreResultsBox="False" HighlightTemplatedItems="true"
                    <ItemTemplate> 
                        <div> 
                            <%#DataBinder.Eval(Container, "Attributes['Display']")%> 
                        </div> 
                    </ItemTemplate> 
                    <Items> 
                        <telerik:RadComboBoxItem runat="server" Text="F" Value="F" display="Fish" /> 
                        <telerik:RadComboBoxItem runat="server" Text="W" Value="W" display="Water" /> 
                    </Items>                     
                </telerik:RadComboBox> 

0
Veselin Vasilev
Telerik team
answered on 05 Sep 2008, 02:33 PM
Hi Khanh,

Thank you for sharing the solution with the community. We appreciate it.

Kind regards,
Veskoni
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
Khanh
Top achievements
Rank 1
Answers by
Khanh
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Share this question
or