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
635
Async mode in ultrawebtab
posted

Hi,

 It is useful to use Async mode of ultrawebtab for maintaining state of a tabs.I am using ultrawebtab version 8.2 control.I am adding tabs dynamically in ultrawebtab on click of treenode from treeview.But tabs are not shown.

<igtab:UltraWebTab ID="tabControl" BorderStyle="None" runat="server" Style="border-spacing: 0px;"  
                                    ViewStateMode="Disabled" DisplayMode="Scrollable"  LoadAllTargetUrls="false" EnableAppStyling="True"
                                    EnableTheming="true"  Height="100%" EnableViewState="false"  AsyncMode="On" selectedindex="4"
                                    ThreeDEffect="false" Width="100%"  Visible="true" AutoPostBack="false" ClientIDMode="Static"
                                    BrowserTarget="Auto">
                                    <RoundedImage FillStyle="LeftMergedWithCenter" NormalImage="imageedit_2_2287647459.jpg"
                                        SelectedImage="imageedit_13_4149283003.jpg" HoverImage="imageedit_16_3964612111.jpg" />
                                    <ScrollButtons LeftButton-Image="prev_up_new.gif" LeftButton-DisabledImage="prev_disabled_new.gif"
                                        LeftButton-HoverImage="prev_hover_new.gif" LeftButton-PressedImage="prev_down_new.gif">
                                    </ScrollButtons>
                                    <ScrollButtons RightButton-Image="next_up_new.gif"   RightButton-DisabledImage="next_disabled_new.gif"
                                        RightButton-HoverImage="next_hover_new.gif" RightButton-PressedImage="next_down_new.gif">
                                    </ScrollButtons>
                                    <AsyncOptions EnableProgressIndicator="true" Triggers="Default" RequestContext="IncludeFormData" ResponseContext="IncludeAllTabs"/>
                                </igtab:UltraWebTab>

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" RenderMode="Inline">
                        <ContentTemplate>
                            <asp:Panel ID="pnl" runat="server">
                                <ignav:UltraWebTree ID="TreeView1" runat="server" EnableAppStyling="False" EnableViewState="true"
                                    CssClass="featureTree" Style="cursor: pointer; overflow: auto; overflow-x: hidden;
                                    display: block; position: absolute; height: 100%; top: 0px; width: 100%; bottom: 5px;"
                                    EnableTheming="false" Visible="true" AutoPostBack="false" ClientIDMode="Static"
                                    WebTreeTarget="ClassicTree" OnNodeClicked="TreeView1_NodeClicked" OnNodeExpanded="TreeView1_NodeExpanded">
                                </ignav:UltraWebTree>
                            </asp:Panel>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="TreeView1" EventName="NodeExpanded" />
                            <asp:AsyncPostBackTrigger ControlID="rpsearch" EventName="ItemCommand" />
                            <asp:AsyncPostBackTrigger ControlID="btnRefresh" EventName="Click" />
                        </Triggers>
                    </asp:UpdatePanel>

    protected void TreeView1_NodeClicked(object sender, WebTreeNodeEventArgs e)
        {
        tab.ContentPane.TargetUrl = dRow["HTTPAddress"].MakeValid_WebAddress().ToString();

     tab = new Tab();
                              
                                tab.Text = string.Format("{0}{1}", string.Empty.PadRight(2), dRow["ObjectName"]) + "<img src='icons/close_button.gif' style='vertical-align:middle;padding-left:8px'onmouseover='mousein(event)' onmouseout=mouseout(event) onclick='closeTab(&quot;" + dRow["ObjectName"].ToString() + "&quot;)'>";
                                //tab.Text = dRow["ObjectName"].ToString();
                                tab.DefaultImage = node.ImageUrl;
                                tab.ImageAlign = ImageAlign.AbsMiddle;
                                //tab.DefaultImage.PadRight(100,'8');
                                tab.Key = dRow["ObjectName"].ToString();
                                tabControl.Tabs.Add(tab);

                tab.Visible = true;
                            tab.Enabled = true;
                            tabControl.SelectedTab = tabControl.Tabs.GetTabIndex(tab);
                            tabControl.SelectedTabStyle.Font.Bold = true;
                            tabControl.Visible = true;
        }

Parents
No Data
Reply
  • 29417
    Offline posted

     Hello Prajakta , 

    Thank you for posting in our forum. 

    It seems like the UltraWebTree is inside a UpdatePanel. During the postback ,initiated due to the Node’s click on the tree, only the content inside the UpdatePanel will be updated.

    Since the UltraWebTab is outside of the update panel it will not be updated so the new tab that’s added on the server side will not appear on the client. 

    In order for the UltraWebTab to reflect the change that occurs on the server side you would need to either remove the update panel or move the UltraWebTab so that it’s inside the update panel as well. 

    Let me know if you have any questions or concerns.  

    Best Regards,

    Maya Kirova

    Developer Support Engineer II

    Infragistics, Inc.

    http://es.infragistics.com/support

     

Children