Rank: Member Groups: Member
Joined: 1/9/2008 Posts: 27
|
Hi, I am facing an issue when I have Update Panel in my page having eo:Dialog. I am calling the Dialog in by button click event of my Grid(Intersoft Web Grid) like as below.But the dialog is not shown .but if I remove the update panel it shows.I really want the update panel in the page
Protected Sub btnDeleteClick(ByVal sender As Object, ByVal e As ImageClickEventArgs)
Dim sScript As String = "<script language=javascript>eo_GetObject('dlgcontent').show(true);</script>" Page.ClientScript.RegisterStartupScript(Me.GetType, "Popup", sScript) dlgnewscontent.InitialState = EO.Web.DialogState.Visible End Sub
<body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <eo:Dialog runat="server" ID="dlgcontent" ControlSkinID="None" Width="400px" Height="250px" HeaderHtml="News" BorderStyle="Solid" CloseButtonUrl="00070101" MinimizeButtonUrl="00070102" AllowResize="false" BorderWidth="1px" ShadowColor="LightGray" BorderColor="#335C88" RestoreButtonUrl="00070103" ShadowDepth="0" AcceptButton="btnSave" AcceptButtonPostBack="true" ResizeImageUrl="00020014"> <FooterStyleActive CssText="font-family:Tahoma;font-size:11px;padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px;"> </FooterStyleActive> <HeaderStyleActive CssText="padding-right: 4px; padding-left: 4px; font-size: 11px; background-image: url(00070104); padding-bottom: 3px; padding-top: 3px; font-family: tahoma"> </HeaderStyleActive> <ContentStyleActive CssText="background-color:#e5f1fd;border-top-color:#335c88;border-top-style:solid;border-top-width:1px;"> </ContentStyleActive> <ContentFrameStyle CssText="height:330px" /> <ContentTemplate> <asp:Literal Visible="true" runat="server" ID="Ltrlmessage"> </asp:Literal> <table> <tr> <td id="titleHeader"> </td> </tr> </table>
</ContentTemplate> </eo:Dialog> <asp:UpdatePanel ID="UpdatePanel" runat="server"> <ContentTemplate> <table width="100%"> <tr valign="top" style="height: 100%"> <td valign="top"> <ISWebGrid:WebGrid ID="WebGrid1" runat="server" OnInitializeDataSource="WebGrid1_InitializeDataSource" Height="500px" DataCacheStorage="Session" > <RootTable RowHeaders="No" DataKeyField="ID"> <Columns> <ISWebGrid:WebGridColumn Bound="False" ButtonAutoPostback="false" Caption="Run" ColumnType="Template" Name="CommandColumn1" Width="25px" > <CellTemplate> <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/delete.gif" OnClick="btnDeleteClick" /> </CellTemplate> </ISWebGrid:WebGridColumn> </Columns> </RootTable> <LayoutSettings AllowColumnMove="Yes" AllowExport="Yes" AllowFilter="Yes" AllowGrouping="Yes" AllowSelectColumns="Yes" AllowSorting="Yes" AlwaysShowHelpButton="False" ApplyFiltersKey="Enter" AutoFilterSuggestion="True" AutoFitColumns="True" GridLineColor="221, 236, 254" GridLines="Default" GroupByBoxVisible="false" Hierarchical="true" RowHighlightType="backgroundonly" ShowRefreshButton="False" TreeLines="false" PagingMode="VirtualLoad" > <HeaderStyle BackgroundImage="/CommonLibrary/Images/ColBk.gif" BorderColor="#ACA899" BorderStyle="None" BorderWidth="1px" Font-Names="Verdana" Font-Bold="True" Font-Size="8pt" ForeColor="Black" Height="27px" HorizontalAlign="Left" /> <FocusCellStyle BorderColor="0, 45, 150" BorderStyle="Solid" BorderWidth="1px" /> <StatusBarCommandStyle> <Active BackColor="RoyalBlue" BaseStyle="Over"> </Active> <Over BackColor="#FBE9B8" BorderColor="#002D96" BorderStyle="Solid" BorderWidth="1px"> </Over> <Normal> <Padding Bottom="1px" Left="1px" Right="1px" Top="1px" /> </Normal> </StatusBarCommandStyle> <GroupByBox ConnectorLineStyle="None"> <LabelStyle BackColor="White" BorderColor="Navy" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="8pt" /> <Style BackColor="Gray"></Style> </GroupByBox> <EditTextboxStyle BorderStyle="None" BorderWidth="0px" Font-Names="Verdana" Font-Size="8pt" HorizontalAlign="Left"> </EditTextboxStyle> <FrameStyle BackColor="#A9C7F4"> </FrameStyle> <SelectedRowStyle BackColor="#FBE9B8" CustomRules="text-overflow: ellipsis; overflow-x: hidden" Font-Names="Verdana" Font-Size="8pt" /> <AlternatingRowStyle BackColor="#DDECFE" CustomRules="text-overflow: ellipsis; overflow-x: hidden" Font-Names="Verdana" Font-Size="8pt" /> <StatusBarStyle BackColor="#DDECFE" BorderColor="#73A1E4" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="8pt"> <Padding Bottom="2px" Left="2px" Right="2px" Top="2px" /> </StatusBarStyle> <RowStyle BackColor="White" CustomRules="text-overflow: ellipsis; overflow-x: hidden" Font-Names="Verdana" Font-Size="8pt" Height="10px" /> <EditFocusCellStyle BackColor="#E9CD82"> </EditFocusCellStyle> </LayoutSettings> </ISWebGrid:WebGrid> </td> </tr> </table> </ContentTemplate> </asp:UpdatePanel>
</div> </form> </body> Any solution for this Thanks Arun
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
That's normal. I believe both statements in your code (RegisterStartupScript and setting InitialState) has no effect in your context.
RegisterStartupScript works when the page is loaded. Obviously when you use UpdatePanel it never reload. So that is never triggered.
Setting InitialState occurs when the dialog is loaded. In your case, the dialog is outside of the UpdatePanel, so again it is never reloaded.
The key to update the dialog is to "update it". When you do not use UpdatePanel, the whole page is reloaded, so everything is updated. When you use UpdatePanel, only what's inside the UpdatePanel is updated. So the dialog is left out untouched.
The easiest workaround is to put the Dialog inside the UpdatePanel. You do not need RegisterStartupScript (I am unable to verify this though because we do not have ISWebGrid, thus we can not run the page).
Thanks
|
Rank: Member Groups: Member
Joined: 1/9/2008 Posts: 27
|
Thanks for the solution.It works...
Arun
|