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.
Hello Govind,
It has been a while since you have made your post, but I suppose the other community members can benefit from this answer as well.
First thing that you should do is to create a new instance of the “WebPanel” object directly and apply all the styles and properties shown in your code - http://help.infragistics.com/Help/NetAdvantage/ASPNET/2010.3/CLR4.0/html/WebPanel_API_Overview.html
If the same behavior is present then you should install the latest Service Release for the used version of controls and test the sample again.
If this behavior is not present then you should revise the creation of your custom control. In the following link you can find the complete guide on how you can create custom controls - http://msdn.microsoft.com/en-us/library/zt27tfhy.aspx
I hope that this information will be helpful.