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
265
SelectedIndexChanged="Async" Issue ?
posted

Hallo,

here is a very simple example with SelectedIndexChanged="Async". Just update Button-Text on TabChange.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
    
    Protected Sub wtMain_SelectedIndexChanged(sender As Object, e As Infragistics.Web.UI.LayoutControls.TabSelectedIndexChangedEventArgs) Handles wtMain.SelectedIndexChanged
    
        CType(sender.Tabs(0).FindChildControl("Button1"), Button).Text = "Button1_upd"
        CType(sender.Tabs(1).FindChildControl("Button2"), Button).Text = "Button2_upd"
        CType(sender.Tabs(2).FindChildControl("Button3"), Button).Text = "Button3_upd"

    End Sub
    
</script>


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <ig:WebTab ID="wtMain" runat="server" Width="400px" Height="600px" OnSelectedIndexChanged="wtMain_SelectedIndexChanged">
            <Tabs>
                <ig:ContentTabItem runat="server" Text="Tab 1">
                    <Template>
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <br />
                                <asp:Button ID="Button1" runat="server" Text="Button1" />
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </Template>
                </ig:ContentTabItem>
            </Tabs>


            <Tabs>
                <ig:ContentTabItem runat="server" Text="Tab 2">
                    <Template>
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                            <ContentTemplate>
                                <br />
                                <asp:Button ID="Button2" runat="server" Text="Button2"  />
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </Template>
                </ig:ContentTabItem>
            </Tabs>
            <Tabs>
                <ig:ContentTabItem runat="server" Text="Tab 3">
                    <Template>
                        <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                            <ContentTemplate>
                                <br />
                                <asp:Button ID="Button3" runat="server" Text="Button3" />
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </Template>
                </ig:ContentTabItem>
            </Tabs>

            <AutoPostBackFlags SelectedIndexChanged="Async" />
        </ig:WebTab>
    </div>
    </form>
</body>
</html>


Function "wtMain_SelectedIndexChanged" run without errors, but i can't see any changes :(

Parents
  • 49378
    posted

    Hello pobo001,

    Thank you for posting in the community.

    When the autopostback flag of the WebTab is set to Async, only the tab control itself is being updated. If you want to make changes to the contained controls I suggest that you set the selectionchanged postback flag to "On" and perhaps wrap the tab control in an UpdatePanel to continue making AJAX calls to the server.

    Please let me know if this helps.

Reply Children
No Data