Replies
Hopefully the following info will help someone else. I was finally able to determine why I couldn't set the SelectedIndex on pageload. It's definitely a Infragistics bug, but at least I figure it out and found a way around it.
The Problem… a review
On each of the tabs I had there was a just a listview control, whenever I tried to specify the tab it would say it couldn't find this control "IPageableItemContainer 'listview' not found" and the page would bomb.
Work Around … the real problem
I figured out it wasn't the listview, it was the datapager above the listview. The datapager refers to the listview, but apparently something it not loading properly when I set the selectedindex server side. If I remove the pager or move the pager to be only under the listview the selectedindex setting works. Its not a perfect fix since I always have my paging at the top and bottom of listviews but at least there is a work around.
Hopefully someone from Infragistics can reproduce this problem now that I have more info and can fix it.
<asp:DataPager ID="datapageernamehere" runat="server" PagedControlID="listviewnamehere" PageSize="20">
<Fields>
<asp:NumericPagerField ButtonType="Link" />
</Fields>
</asp:DataPager>
Moved the logic to Page_Load but getting the same error.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
'First Load
If Not Request.Item("t") Is Nothing Then
If IsNumeric(Request.Item("t")) Then
WebTab1.SelectedIndex = CInt(Request.Item("t"))
End If
Else
WebTab1.SelectedIndex = 0
End If
Else
'Post Back
End If
End Sub
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<ig:WebTab ID="WebTab1" runat="server" Height="184px" Width="700px" StyleSetName="Default"
EnableOverlappingTabs="true">
<Tabs>
<ig:ContentTabItem runat="server" Text="tab 1">
</ig:ContentTabItem>
<ig:ContentTabItem runat="server" Text="tab 2">
</ig:ContentTabItem>
<ig:ContentTabItem runat="server" Text="tab 3">
</ig:ContentTabItem>
</Tabs>
<PostBackOptions EnableAjax="true" EnableLoadOnDemand="true" />
</ig:WebTab>
</ContentTemplate>
</asp:UpdatePanel>
Protected Sub WebTab1_SelectedIndexChanged(ByVal sender As Object, ByVal e As Infragistics.Web.UI.LayoutControls.TabSelectedIndexChangedEventArgs) Handles WebTab1.SelectedIndexChanged
Label1.Text = Now.ToLongTimeString
End Sub
The SelectedIndexChanged event only first for the first click on each tab, have tried a number of combinations with PostBackOptions with no luck.