Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
WebPanel Expand Collapse Issue
posted

Webpanel is losing its Expand, Collapse Styles in IE. I am having 2 WebPanels in my screen in which I am displaying a Ultrawebgrid along with Add/Edit buttons in the top webpanel and in the below panel i am showing the controls (Textboxes/Dropdowns) to edit/add data.

By default the webpanel having the grid is in expanded state and the bottom panel is hidden. When 'Add' button is clicked in this panel, this panel gets collapsed and the below panel is displayed with the Add/Edit controls.

So, when Add/Edit Button is clicked the WebPanel is losing its Style and getting shrinked.

Actual the WebPanel in the page is a CustomControl inherited from WebPanel. The default properties for this control is being provided in the constructor of the CustomControl itself.

Following are the properties being assigned :

public UppCustomWebPanel()
        {
            this.StyleSetName = "Office2007Blue";
            this.Width = Unit.Percentage(100.0);
            this.CssClass = "webPanel";

            this.Header.TextAlignment = TextAlignment.Left;

            this.Header.ExpansionIndicator.CollapsedImageUrl = "~/Images/PanelCollapse.png";
            this.Header.ExpansionIndicator.ExpandedImageUrl = "~/Images/PanelExpand.png";
           
            this.Header.ExpandedAppearance.Styles.Height = 20;
            this.Header.ExpandedAppearance.Styles.BackColor = (System.Drawing.Color)(new System.Drawing.ColorConverter().ConvertFromString("#3399cc"));
            this.Header.ExpandedAppearance.Styles.ForeColor = System.Drawing.Color.White;
            this.Header.ExpandedAppearance.Styles.Font.Name = "Verdana";
            this.Header.ExpandedAppearance.Styles.Font.Bold = true;


            this.Header.CollapsedAppearance.Styles.Width = Unit.Percentage(100.0);
            this.Header.CollapsedAppearance.Styles.Height = 20;
            this.Header.CollapsedAppearance.Styles.BackColor = (System.Drawing.Color)(new System.Drawing.ColorConverter().ConvertFromString("#3399cc"));
            this.Header.CollapsedAppearance.Styles.ForeColor = System.Drawing.Color.White;
            this.Header.CollapsedAppearance.Styles.Font.Name = "Verdana";
            this.Header.CollapsedAppearance.Styles.Font.Bold = true;
        }

Please let me know why this problem is occuring. Very serious problem respond immediately.