Is there a way to selectively cancel a postback depending on the tab using client script? I have tried trapping the before tab changed event and using return true or return false and also oEvent.needPostBack=false; and nothing seems to work.
I need to post back only two of the 10 tabs to ensure a webgrid is properly populated (another odd thing).
Hope my codes is useful to you. It works wellonmy machine.
function UltraWebTab_Main_BeforeSelectedTabChange(oWebTab, oTab, oEvent) { switch (oTab.getText()) { case "Contact Information": oEvent.needPostBack = true; break; case "Feedbacks": oEvent.needPostBack = true; break; default: oEvent.needPostBack = false; break; } }
<igtab:ultrawebtab id="UltraWebTab_Main" runat="server" dummytargeturl=" " height="100%" width="100%"> <ClientSideEvents BeforeSelectedTabChange="UltraWebTab_Main_BeforeSelectedTabChange" /> .......
</igtab:ultrawebtab>
protected void UltraWebTab_Main_TabClick(object sender, Infragistics.WebUI.UltraWebTab.WebTabEvent e) { switch (e.Tab.Text) { case "Contact Information": Populate_ContactInformationTab(); break; case "Participants": break; case "Feedbacks": Populate_Feedbacks(); break; } }