We have a custom user control that has RadListBoxes. We populate the RadListboxes with dynamic Templates in the OnIt method.
sample:
Right now we have a page that has 6 of our custom control.
DefaultListBoxTemplate Code:
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
sample:
override protected void OnInit(EventArgs e){ // // CODEGEN: This call is required by the ASP.NET Web Form Designer. // InitializeComponent(); 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(); } base.OnInit(e);}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); container.Controls.Add(label); } /// <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
