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

Adding items to the radcombobox

5 Answers 75 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 02 Jul 2008, 10:07 PM
I load my combox from a database table, but one of the fields I have in there is a image link and I would like ot be able to display the image in the dropdown, and also after the dropdown has finished populating I want to add an item for "Choose Font".

I see from the example how it is done in the aspx page, but I would like ot be able to do this from code behind, any help would be appreciated. Thanks.

5 Answers, 1 is accepted

Sort by
0
IrishManInUSA
Top achievements
Rank 1
answered on 03 Jul 2008, 03:11 AM
I figured it out.
0
Mike
Top achievements
Rank 1
answered on 24 Jul 2008, 07:01 PM
John,

I am having the same problem, can you share with us what you did to resolve it?

Thanks!
0
IrishManInUSA
Top achievements
Rank 1
answered on 24 Jul 2008, 07:21 PM
I ended up doing it this way, since it was a item of the combox, I used the radcomboboxitem and it worked.

with NAMEOFYOURCOMBOX
    .items.insert(0, new Telerik.web.ui.radcomboboxitem("Choose Font"))
end with

0
Mike
Top achievements
Rank 1
answered on 24 Jul 2008, 07:24 PM
You know what is happening?  I remove the following tag...

<telerik:radformdecorator id="FormDecorator1" 
                          runat="server" 
                          decoratedcontrols="all"   
                         
Skin="MySkin" 
                         
EnableEmbeddedSkins="False" /> 

and everything is just fine.  It looks like there is a bug with this control and the radformdecorator.......
 

0
Rosi
Telerik team
answered on 25 Jul 2008, 07:40 AM
Hi all,


Yes, there is a problem with RadFormDecorator and RadComboBox in build 2008.1.619 and it is fixed in Q2 2008 build released yesterday.

We believe that this issue is caused by a bug in IE when table with table-layout = fixed is placed inside another table (RadComboBox represents a table with  table-layout = fixed ) and RadFormDecorator applies its styles.

You can workaround it as follows:

1. Place RadFormDecorator in the beginning of the page.
2. Hook on OnClientEvent of RadComboBox and execute the following code.
  <script type="text/javascript">  
            function OnClientLoad(sender)  
            {  
                var input = sender.get_inputDomElement();                                  
                if (input.style.cssText != null) input.style.cssText = input.style.cssText;         
            }  
            </script> 


Greetings,
Rosi
the Telerik team

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