Hi,
I am going through my code one Telerik control at a time updating them to the Prometheus version and have stumbled across an issue with the new RadComboBox which I cannot fix.
My combobox is loaded with dynamic data from a SQL database and each item consists of an image followed by a string of text. I had set up a template for this and assigned it programmatically. This worked perfectly well with the regualar RadComboBox. Having upgraded to the Prometheus version, I get no images and no text on the combobox items, and having debugged the template, the code never enters the databound control functions listed below (it does enter InstantiateIn).
Can anyone help please as I have checked all the help and this does not seem to have changed between versions?
Thanks in advance.
| EntityTypeCombo.ItemTemplate = new ComboBoxHandler.EntityTypeTemplate(); |
| public class EntityTypeTemplate : ITemplate |
| { |
| public void InstantiateIn(Control container) |
| { |
| Image image1 = new Image(); |
| image1.DataBinding += new EventHandler(image1_DataBinding); |
| Label label1 = new Label(); |
| label1.ID = "ItemLabel"; |
| label1.DataBinding += new EventHandler(label1_DataBinding); |
| container.Controls.Add(image1); |
| container.Controls.Add(label1); |
| } |
| private void image1_DataBinding(object sender, EventArgs e) |
| { |
| Image target = (Image)sender; |
| RadComboBoxItem item = (RadComboBoxItem)target.BindingContainer; |
| string itemText = (string)DataBinder.Eval(item, "Value"); |
| target.ImageUrl = "images\\" + itemText + ".gif"; |
| } |
| private void label1_DataBinding(object sender, EventArgs e) |
| { |
| Label target = (Label)sender; |
| RadComboBoxItem item = (RadComboBoxItem)target.BindingContainer; |
| string itemText = " " + (string)DataBinder.Eval(item, "Text"); |
| target.Text = itemText; |
| } |
| } |
I have a static RadDockZone, and I add RadDocks dynamically. Everything works fine. But for my page layout I needed to add some styles to the RadDockZone: position it absolutely and add z-index: -1 (so that some other controls can be shown above the zone). While positioning doesn't seem to affect RadDockZone, setting z-index: -1 makes it impossible to close any RadDock inside (I click the x and nothing happens, in both IE and FF).
My markup:
<telerik:RadDockZone runat="server" ID="RadDockZone1" style="position: absolute; top: 50px; left: 5px; z-index: -1;" Width="980px" Height="800px" Orientation="Horizontal">
</telerik:RadDockZone>
Is it a bug or should I add positioning styles to the RadDockZone in some other way?
