Skip to content

Replies

0
Wagner
Wagner answered on Aug 11, 2010 5:40 PM

You don't have the right PostBackOptions…. Try this instead:

<PostBackOptions 

EnableReloadingUnselectedTab="true" 

EnableAjax="true" EnableLoadOnDemand="false" />


0
Wagner
Wagner answered on Aug 11, 2010 4:18 PM

Can you show us a snippet of your code so we can help you better?

0
Wagner
Wagner answered on Aug 10, 2010 7:37 PM

Actually, I have found out a simpler workaround… Just add a UpdatePanel around the WebTab control… Once you do that then the event will be fired for the first tab click.

Cheers,

Wagner Danda da Silva

0
Wagner
Wagner answered on Aug 10, 2010 5:18 PM

I had a similar problem, the SelectedIndexChange event would trigger fine when moving from tab 1 to tab 2 or tab 3, but when I clicked back to tab 1, no event is triggered. Here is the PostBackOptions that I used:

<ig:WebTab ID="WebTab1" … >

    <Tabs> here I had 3 simple template tabs configured  </Tabs>

    <PostBackOptions EnableReloadingUnselectedTab="true" EnableAjax="true" 

EnableLoadOnDemand="false" />

</ig:WebTab>

And here is the code behind with the problem:

 

protected void Page_Load(object sender, EventArgs e)  {

        WebTab1.SelectedIndexChanged += new TabSelectedIndexChangedEventHandler(TabChanged);

 }

 protected void TabChanged(object sender, TabSelectedIndexChangedEventArgs args) {

        // Logic here

  }

 

Here is how I solved it – I created my own event handler using the same PostBackOptions: 

 

protected void Page_Load(object sender, EventArgs e)    {

        int WebTab1SelectedIndexOld = (int) (ViewState[“WebTab1.SelectedIndex.Old”] ?? 0);

        if (WebTab1SelectedIndexOld != WebTab1.SelectedIndex)   {

            TabChanged(WebTab1SelectedIndexOld, WebTab1.SelectedIndex);

        }

        ViewState[“WebTab1.SelectedIndex.Old”] = WebTab1.SelectedIndex;

    }

    protected void TabChanged(int oldIndex, int newIndex)   {

        // Logic here….

    }

 

I guess this is a bug in Infragistics (unless I'm not using the proper PostBackOptions), hopefully it will be fixed with the next release.

By the way, I have found the PostBackOptions way too confusing to use it direcly from Visual Studio – I had to read the whole API documentation to understand their combination – some options won't work by them themselves. I recommend the following reading: https://help.infragistics.com/Help/Doc/ASPNET/2010.2/CLR4.0/html/Infragistics4.Web.v10.2~Infragistics.Web.UI.LayoutControls.TabPostBackOptions.html

 

Please don't forget to mark answered if this have helped you.

 

Thanks,

Wagner Danda da Silva