In IE7 Only - With Multiple RadListBoxes, they disappear but still in HTML markup

2 posts, 0 answers
  1. Jason Sweatt
    Jason Sweatt avatar
    3 posts
    Member since:
    Apr 2010

    Posted 17 Nov 2010 Link to this post

    We have a custom user control that has RadListBoxes.  We populate the RadListboxes with dynamic Templates in the OnIt method.
    override protected void OnInit(EventArgs e)
        // CODEGEN: This call is required by the ASP.NET Web Form Designer.
        if (NumberOfColumns == 1)
            ShelfListBox.ItemTemplate = new DefaultListBoxTemplate();
            CartListBox.ItemTemplate = new DefaultListBoxTemplate();
        else if (NumberOfColumns == 2)
            ShelfListBox.ItemTemplate = new TwoColumnListBoxTemplate();
            CartListBox.ItemTemplate = new TwoColumnListBoxTemplate();
        else if (NumberOfColumns == 3)
            ShelfListBox.ItemTemplate = new ThreeColumnListBoxTemplate();
            CartListBox.ItemTemplate = new ThreeColumnListBoxTemplate();
    Right now we have a page that has 6 of our custom control.  
    DefaultListBoxTemplate Code:
    /// <summary>
    /// DefaultListBox ItemTemplate one column
    /// </summary>
    public class DefaultListBoxTemplate : ITemplate
        /// <summary>
        /// Defines the <see cref="T:System.Web.UI.Control"/> object that child controls and templates belong to. These child controls are in turn defined within an inline template.
        /// </summary>
        /// <param name="container">The <see cref="T:System.Web.UI.Control"/> object to contain the instances of controls from the inline template.</param>
        public void InstantiateIn(Control container)
            var label = new Label
                                ID = "LabelListItem"
            label.DataBinding += new EventHandler(LabelListItemDataBinding);
        /// <summary>
        /// Handles the DataBinding event of the LabelListItem control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private static void LabelListItemDataBinding(object sender, EventArgs e)
            var label = (Label)sender;
            var item = (RadListBoxItem)label.BindingContainer;
            var listItemText = DataBinder.Eval(item.DataItem, "Property1") as String;
            label.Text = listItemText;

    Everything renders correctly on the page, but for some reason in IE7 only, the display of the radlistboxes disappear.  If the page does something on the client side; some of the radlistobxes reappear and some disappear. very strange occurrences in IE7.  Everything works correctly in IE8 or higher, Firefox and chrome.

    tried attaching code in zip file...

    Version: Telerik.Web.UI 2010.1.309.35
  2. Kamen Bundev
    Kamen Bundev avatar
    1532 posts

    Posted 19 Nov 2010 Link to this post

    Hi Jason,

    You probably are experiencing this bug - RadListBox has position: relative and such behavior is possible in IE6/7. To fix it, set position: relative to its scrolling container (I can help you pinpoint it if you send me a live URL of the site - open a ticket if you prefer the privacy).

    Kind regards,
    Kamen Bundev
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top