Hi all,
I'm implementing a WebTab control that is nested within an UpdatePanel, so that when information underlying the data displayed in each tab is updated, a message will be displayed to the user while it is updated, and then they're reloaded.
I've disabled AutoPostBack as that seems to cause more issues than it solves. Bsaically, we want each of the tabs to persist their state if they HAVEN'T been loaded yet. So on the initial page load, we load up tab 1, then clicking tab 2 and 3 should load their contents, and clicking any of the other tabs again won't do anything.
However, after the updatepanel is updated, the selectedindexchanged event does not fire, but we need it to. How can we force the event to fire after the updatepanel has been updated?
I'm sure there's a client side function that's preventing the tabs from being reloaded again, but just not sure what that is exactly.
Just to reiterate even further, basically we want to be able to reset the tabs on the click of another button, but have the loadondemand property still in place. That is, we'd load one tab, and the rest would load when you click on them. Again though, we don't want the tabs to reload UNLESS that button has been clicked. We want them to load on demand, and then stay loaded unless we click the button, if the button is clicked, we want to load them on demand again.
Hope I'm being clear enough!
UPDATE:
It seems what I want to control is controlled in the underlying AJAXContentPane for each ContentTabItem. Basically, once the tab is loaded, I can see that the 'WasInstantiated' member changes from false to true. I'm assuming this is what determines whether or not a tab will be loaded on clicking it. Is there a way to change this? Also, if there is a way to change this, is there a way to make the tab blank while it loads? (like when a tab is loaded for the first time). So if a tab has been loaded, but the button is clicked to reload them again, on clicking each tab again, is it possible to remove the previous data so it doesn't display while the tab loads again?
Also, loading all tabs at once isn't an option, as we need to run lengthy reports for some of the tabs. We also have a webchart in one of the tabs, and therefore it needs rebinding from any proper postbacks, so that also cancels out a few other solutions
Just reading over this again, our issue is that the selectedindexchanged event only fires once for each tab, then doesn't fire again. This is fine for our purposes, but we want to be able to 'reset' the events so to speak, to allow them all to fire once for each tab again
Thanks for the reply!
As it is now, after first loading the page, clicking on each tab will load it for the first time, but clicking again won't. We just want to be able to reset the tabs as if the page had been loaded again using custom logic, so that we can, for instance, select a different date in a drop down, reload the currently selected tab, and then reload the other tabs ONCE after clicking on them.
Does that make sense?
Hello Alex,
Thank you for contacting Infragistics community.
Please note that raising of SelectedIndexChanged event could cause updating the UpdatePanel, however the opposite is not possible. SelectedIndexChanged event requires currently selected tab to be changed in order to fire. This in turn will update the content of the UpdatePanel. You may use UpdatePanel <Triggers> element to specify the control and the event that will force the updating. I'm attaching a sample that demonstrates WebTab with multiple tabs and a button outside it, which changes the content of one of the tabs and respectively updates the UpdatePanel.
What do you mean with "preventing the tabs from being loaded again"?
If I can provide further assistance, please let me know.
Regards,
Tsanna