I've been having trouble with Infragistics controls losing their style when they're inside AJAX UpdatePanels. Various forum posts indicate problems with mixing Infragistics controls and UpdatePanels, so I'm now trying to make my app work with WebAsyncRefreshPanels instead, but I'm seeing the same behavior.
In a stripped-down ASP.NET test app, I have a WebCombo and a UltraWebMenu in separate WebAsyncRefreshPanels. In the WebCombo's SelectedRowChanged event, I want to add a subitem to the WebMenu and then refresh the WebMenu's WARP to update the UltraWebMenu to reflect the change. To trigger the refresh, I've added the UltraWebMenu's WARP to the WebCombo's LinkedRefreshControlID list. In my web.config, enableAppStyling is set to true, and the UltraWebMenu's EnableAppStyling property is set to true also.
On page load, the UltraWebMenu looks fine. When the WebCombo1_OnSelectedRowChanged event fires and triggers the refresh of the UltraWebMenu WARP, however, the UltraWebMenu reverts to a default style with boxed menu items and a different font. The new subitem is there, but the style is lost.
Is there a fix for this or another way to make this work? If I'm going to have the same problem regardless of whether I use a WARP or an UpdatePanel, I'd rather use the UpdatePanel because I can update it explicitly in code.
Can you post your stripped down sample?
Devin
I don't see an option to attach a file, so I've copied the relevant parts of my sample below. It's an ASP.NET web site generated out of VS 2005.Thanks in advance for your help,Marshall
The appstylist setting in web.config:
The event handler in default.aspx.cs:
protected void WebCombo1_SelectedRowChanged(object sender, Infragistics.WebUI.WebCombo.SelectedRowChangedEventArgs e){Infragistics.WebUI.UltraWebNavigator.Item newsItem = null; foreach (Infragistics.WebUI.UltraWebNavigator.Item i in UltraWebMenu1.Items) { if (i.Text.ToLower() == "news") { newsItem = i;break; } }Infragistics.WebUI.UltraWebNavigator.Item item = new Infragistics.WebUI.UltraWebNavigator.Item("CNN", null, null, "http://cnn.com", null);newsItem.Items.Insert(0, item); }
protected void WebCombo1_SelectedRowChanged(object sender, Infragistics.WebUI.WebCombo.SelectedRowChangedEventArgs e)
foreach (Infragistics.WebUI.UltraWebNavigator.Item i in UltraWebMenu1.Items) { if (i.Text.ToLower() == "news") { newsItem = i;break; } }Infragistics.WebUI.UltraWebNavigator.Item item = new Infragistics.WebUI.UltraWebNavigator.Item("CNN", null, null, "http://cnn.com", null);newsItem.Items.Insert(0, item);
{
if (i.Text.ToLower() == "news") { newsItem = i;break; }
newsItem = i;break;
newsItem = i;
}
Default.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <%@ Register Assembly="Infragistics2.WebUI.Misc.v7.3, Version=7.3.20073.1043, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"Namespace="Infragistics.WebUI.Misc" TagPrefix="igmisc" %> <%@ Register Assembly="Infragistics2.WebUI.UltraWebNavigator.v7.3, Version=7.3.20073.1043, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"Namespace="Infragistics.WebUI.UltraWebNavigator" TagPrefix="ignav" %> <%@ Register Assembly="Infragistics2.WebUI.WebCombo.v7.3, Version=7.3.20073.1043, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"Namespace="Infragistics.WebUI.WebCombo" TagPrefix="igcmbo" %> <%@ Register Assembly="Infragistics2.WebUI.UltraWebGrid.v7.3, Version=7.3.20073.1043, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.WebUI.UltraWebGrid" TagPrefix="igtbl" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"><title>Untitled Page</title> </head> <body> <form id="form1" runat="server"><div> <igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server" Height="20px" Width="80px"> <ignav:UltraWebMenu ID="UltraWebMenu1" runat="server" JavaScriptFilename="" JavaScriptFileNameCommon="" LeafItemImageUrl="" ParentItemImageUrl="" StyleSetName="" BackColor="Transparent" EnableAppStyling="True" BorderColor="Transparent" BorderStyle="None" BorderWidth="0px" Font-Bold="True"> <ExpandEffects ShadowColor="LightGray" /> <Levels> <ignav:Level Index="0" /> <ignav:Level Index="1" /> </Levels> <Items> <ignav:Item Text="Google"> <Items> <ignav:Item TargetUrl="http://maps.google.com/maps" Text="Google Maps"> </ignav:Item> <ignav:Item TargetUrl="http://scholar.google.com" Text="Google Scholar"> </ignav:Item> </Items> </ignav:Item> <ignav:Item Text="News"> <Items> <ignav:Item TargetUrl="http://www.nytimes.com" Text="New York Times"> </ignav:Item> </Items> </ignav:Item> <ignav:Item TargetUrl="http://infragistics.com" Text="Infragistics"> </ignav:Item> </Items> <Styles> <ignav:Style BackColor="#C1D2EE" BorderColor="#316AC5" BorderStyle="Solid" BorderWidth="1px" CssClass="TopHover6" Cursor="Default" ForeColor="Black"> </ignav:Style> <ignav:Style BackColor="FloralWhite" BackgroundImage="None" BorderColor="FloralWhite" BorderStyle="Solid" BorderWidth="1px" CssClass="TopClass6" ForeColor="Black"> </ignav:Style> </Styles> <ItemStyle BorderWidth="0px" Font-Size="9pt" ForeColor="Black" Width="100%"> <Margin Bottom="1px" Left="1px" Right="1px" Top="1px" /> </ItemStyle> <IslandStyle BackColor="WhiteSmoke" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" Cursor="Default" Font-Names="MS Sans Serif" Font-Size="8pt" ForeColor="Black"> </IslandStyle> <HoverItemStyle BackColor="LightSteelBlue" BorderColor="RoyalBlue" BorderStyle="Solid" BorderWidth="1px" Cursor="Default" ForeColor="White"> <Margin Bottom="0px" Left="0px" Right="0px" Top="0px" /> </HoverItemStyle> <TopSelectedStyle BackColor="SteelBlue" BorderColor="#0000C0" BorderStyle="Solid" BorderWidth="1px"> <Margin Bottom="0px" Left="0px" Right="0px" Top="0px" /> </TopSelectedStyle> <HeaderStyle> <BorderDetails ColorBottom="Transparent" ColorLeft="Transparent" ColorRight="Transparent" ColorTop="Transparent" /> </HeaderStyle> <MenuClientSideEvents InitializeMenu="" ItemChecked="" ItemClick="" ItemHover="" SubMenuDisplay="" /> </ignav:UltraWebMenu> </igmisc:WebAsyncRefreshPanel> <br /> <br /> <igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel2" runat="server" Height="20px" Width="80px" LinkedRefreshControlID="WebAsyncRefreshPanel1"> <igcmbo:WebCombo ID="WebCombo1" runat="server" BackColor="White" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px" EnableAppStyling="True" ForeColor="Black" SelBackColor="DarkBlue" SelForeColor="White" Version="4.00" OnSelectedRowChanged="WebCombo1_SelectedRowChanged"> <Columns> <igtbl:UltraGridColumn> <header caption="Column0"></header> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn><header> <RowLayoutColumnInfo OriginX="1"></RowLayoutColumnInfo> </header><footer> <RowLayoutColumnInfo OriginX="1"></RowLayoutColumnInfo> </footer> </igtbl:UltraGridColumn> </Columns> <ExpandEffects ShadowColor="LightGray" /> <DropDownLayout BorderCollapse="Separate" RowHeightDefault="20px" Version="4.00"> <HeaderStyle BackColor="LightGray" BorderStyle="Solid"> <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" /> </HeaderStyle> <FrameStyle BackColor="Silver" BorderStyle="Ridge" BorderWidth="2px" Cursor="Default" Font-Names="Verdana" Font-Size="10pt" Height="130px" Width="325px"> </FrameStyle> <RowStyle BackColor="White" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px"> <BorderDetails WidthLeft="0px" WidthTop="0px" /> </RowStyle> <SelectedRowStyle BackColor="DarkBlue" ForeColor="White" /> </DropDownLayout> <Rows> <igtbl:UltraGridRow Height=""><cells> <igtbl:UltraGridCell Text="hello"></igtbl:UltraGridCell><igtbl:UltraGridCell Text="there"></igtbl:UltraGridCell> </cells> </igtbl:UltraGridRow> <igtbl:UltraGridRow Height=""><cells> <igtbl:UltraGridCell Text="this"></igtbl:UltraGridCell><igtbl:UltraGridCell Text="is"></igtbl:UltraGridCell> </cells> </igtbl:UltraGridRow> <igtbl:UltraGridRow Height=""><cells> <igtbl:UltraGridCell Text="a"></igtbl:UltraGridCell><igtbl:UltraGridCell Text="test"></igtbl:UltraGridCell> </cells> </igtbl:UltraGridRow> </Rows> </igcmbo:WebCombo> </igmisc:WebAsyncRefreshPanel> </div></form> </body> </html>
<%@ Register Assembly="Infragistics2.WebUI.Misc.v7.3, Version=7.3.20073.1043, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
<%@ Register Assembly="Infragistics2.WebUI.UltraWebNavigator.v7.3, Version=7.3.20073.1043, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
<%@ Register Assembly="Infragistics2.WebUI.WebCombo.v7.3, Version=7.3.20073.1043, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
<%@ Register Assembly="Infragistics2.WebUI.UltraWebGrid.v7.3, Version=7.3.20073.1043, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
Namespace="Infragistics.WebUI.UltraWebGrid" TagPrefix="igtbl" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
</head>
<body>
<form id="form1" runat="server">
<igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server" Height="20px"
Width="80px">
<ignav:UltraWebMenu ID="UltraWebMenu1" runat="server" JavaScriptFilename="" JavaScriptFileNameCommon=""
LeafItemImageUrl="" ParentItemImageUrl="" StyleSetName="" BackColor="Transparent" EnableAppStyling="True" BorderColor="Transparent" BorderStyle="None" BorderWidth="0px" Font-Bold="True">
<ExpandEffects ShadowColor="LightGray" />
<Levels>
<ignav:Level Index="0" />
<ignav:Level Index="1" />
</Levels>
<Items>
<ignav:Item Text="Google">
<ignav:Item TargetUrl="http://maps.google.com/maps" Text="Google Maps">
</ignav:Item>
<ignav:Item TargetUrl="http://scholar.google.com" Text="Google Scholar">
</Items>
<ignav:Item Text="News">
<ignav:Item TargetUrl="http://www.nytimes.com" Text="New York Times">
<ignav:Item TargetUrl="http://infragistics.com" Text="Infragistics">
<Styles>
<ignav:Style BackColor="#C1D2EE" BorderColor="#316AC5" BorderStyle="Solid" BorderWidth="1px"
CssClass="TopHover6" Cursor="Default" ForeColor="Black">
</ignav:Style>
<ignav:Style BackColor="FloralWhite" BackgroundImage="None" BorderColor="FloralWhite"
BorderStyle="Solid" BorderWidth="1px" CssClass="TopClass6" ForeColor="Black">
</Styles>
<ItemStyle BorderWidth="0px" Font-Size="9pt" ForeColor="Black" Width="100%">
<Margin Bottom="1px" Left="1px" Right="1px" Top="1px" />
</ItemStyle>
<IslandStyle BackColor="WhiteSmoke" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"
Cursor="Default" Font-Names="MS Sans Serif" Font-Size="8pt" ForeColor="Black">
</IslandStyle>
<HoverItemStyle BackColor="LightSteelBlue" BorderColor="RoyalBlue" BorderStyle="Solid"
BorderWidth="1px" Cursor="Default" ForeColor="White">
<Margin Bottom="0px" Left="0px" Right="0px" Top="0px" />
</HoverItemStyle>
<TopSelectedStyle BackColor="SteelBlue" BorderColor="#0000C0" BorderStyle="Solid"
BorderWidth="1px">
</TopSelectedStyle>
<HeaderStyle>
<BorderDetails ColorBottom="Transparent" ColorLeft="Transparent" ColorRight="Transparent"
ColorTop="Transparent" />
</HeaderStyle>
<MenuClientSideEvents InitializeMenu="" ItemChecked="" ItemClick="" ItemHover=""
SubMenuDisplay="" />
</ignav:UltraWebMenu>
</igmisc:WebAsyncRefreshPanel>
<br />
<igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel2" runat="server" Height="20px" Width="80px" LinkedRefreshControlID="WebAsyncRefreshPanel1">
<igcmbo:WebCombo ID="WebCombo1" runat="server" BackColor="White" BorderColor="Silver"
BorderStyle="Solid" BorderWidth="1px" EnableAppStyling="True" ForeColor="Black"
SelBackColor="DarkBlue" SelForeColor="White" Version="4.00" OnSelectedRowChanged="WebCombo1_SelectedRowChanged">
<Columns>
<igtbl:UltraGridColumn>
<header caption="Column0"></header>
</igtbl:UltraGridColumn>
<RowLayoutColumnInfo OriginX="1"></RowLayoutColumnInfo>
</header>
</footer>
</Columns>
<DropDownLayout BorderCollapse="Separate" RowHeightDefault="20px" Version="4.00">
<HeaderStyle BackColor="LightGray" BorderStyle="Solid">
<BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" />
<FrameStyle BackColor="Silver" BorderStyle="Ridge" BorderWidth="2px" Cursor="Default"
Font-Names="Verdana" Font-Size="10pt" Height="130px" Width="325px">
</FrameStyle>
<RowStyle BackColor="White" BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px">
<BorderDetails WidthLeft="0px" WidthTop="0px" />
</RowStyle>
<SelectedRowStyle BackColor="DarkBlue" ForeColor="White" />
</DropDownLayout>
<Rows>
<igtbl:UltraGridRow Height="">
<igtbl:UltraGridCell Text="hello"></igtbl:UltraGridCell>
</cells>
</igtbl:UltraGridRow>
<igtbl:UltraGridCell Text="this"></igtbl:UltraGridCell>
<igtbl:UltraGridCell Text="a"></igtbl:UltraGridCell>
</Rows>
</igcmbo:WebCombo>
</div>
</body>
</html>