I have an UltraWebTab control that i need to migrate to a new WebTab component.for most of the properties and attributes, i was able to find an equivalence, but for some of them, i'm stuck and i'd like some help, please.
Here is the markup that i have for the UltraWebTab :
<igtab:UltraWebTab ID='tab155' runat='server' BorderColor='#949878' BorderWidth="0px" BorderStyle="Solid" ThreeDEffect='False' Width='100%' SelectedTab="6"> <Tabs> <igtab:Tab Key="LocationAndDate" Tag="LocationAndDate" Text=" Location and Date" Tooltip="Location and Date"> <ContentPane TargetUrl="" Scrollable="Hidden"> </ContentPane> </igtab:Tab> <igtab:TabSeparator> </igtab:TabSeparator> <igtab:Tab Key="Parties" Tag="Parties" Text=" Parties" Tooltip="Parties"> <ContentPane TargetUrl=""> </ContentPane> </igtab:Tab> <igtab:TabSeparator> </igtab:TabSeparator> <igtab:Tab Key="MoreParties" Tag="MoreParties" Text=" More Parties" Tooltip="More Parties"> <ContentPane TargetUrl=""> </ContentPane> </igtab:Tab> <igtab:TabSeparator> </igtab:TabSeparator> <igtab:Tab Key="Quotation" Tag="Quotation" Text=" Quotation" Tooltip="Quotation"> <ContentPane TargetUrl=""> </ContentPane> </igtab:Tab> <igtab:TabSeparator> </igtab:TabSeparator> <igtab:Tab Key="Items" Tag="Items" Text=" Items" Tooltip="Items"> <ContentPane TargetUrl=""> </ContentPane> </igtab:Tab> <igtab:TabSeparator> </igtab:TabSeparator> <igtab:Tab Key="Detail" Tag="Detail" Text=" Detail" Tooltip="Detail"> <ContentPane TargetUrl=""> </ContentPane> </igtab:Tab> <igtab:Tab Key="DeclineReason" Tag="DeclineReason" Text=" Status Log" Tooltip="Status Log"> <ContentPane TargetUrl=""> </ContentPane> <ContentTemplate> <%-- <asp:TextBox ID="txtContent" runat="server" CssClass="ContentText" Height="262px" TextMode="MultiLine" Width="571px"></asp:TextBox>--%> <div style="width: 100%; height: 450px; overflow: auto;"> <asp:GridView ID="gvStatusLog" runat="server" AllowSorting="True" AutoGenerateColumns="False" CssClass="GridViewTable" PageSize="15" Width="920px"> <RowStyle CssClass="GridViewRow" /> <Columns> <asp:BoundField DataField="ActionName" HeaderText="Action"> <HeaderStyle Width="90px" Wrap="False" /> <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="90px" Wrap="False" /> </asp:BoundField> <asp:BoundField DataField="ActionBy" HeaderText="Action by"> <HeaderStyle Width="110px" Wrap="False" /> <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="110px" Wrap="False" /> </asp:BoundField> <asp:BoundField DataField="ActionDate" HeaderText="Action date"> <HeaderStyle Width="160px" Wrap="False" /> <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="160px" Wrap="False" /> </asp:BoundField> <asp:BoundField DataField="Remarks" HeaderText="Remark"> <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" /> </asp:BoundField> </Columns> <PagerStyle CssClass="GridViewTablePaging" /> <AlternatingRowStyle CssClass="GridViewAlternatingRow" /> </asp:GridView> </div> </ContentTemplate> </igtab:Tab> </Tabs> <ClientSideEvents AfterSelectedTabChange="tab155_AfterSelectedTabChange" InitializeTabs="tab155_InitializeTabs"/> <RoundedImage FillStyle='LeftMergedWithCenter' LeftSideWidth='7' RightSideWidth='6' ShiftOfImages='2' /> </igtab:UltraWebTab>
here is what i have so far :
function tab155_InitializeTabs(oWebTab) { HandleTab(oWebTab, oWebTab.getSelectedTab());}
function tab155_AfterSelectedTabChange(oWebTab, oTab, oEvent) {
var CanCallAgentFunction = false; CanCallAgentFunction = oTab.targetUrl != "";
HandleTab(oWebTab, oTab); document.getElementById("<%=hdReturnTab.ClientID %>").value = ""; if (CanCallAgentFunction && oTab.Key == "MoreParties") { AgentFunction(); } }
Can you tell me how to find those own javascript function name like "getSelectedTab()" and others?
Hi,
I'm just checking if you need any further assistance with the matter.
Hello,
You can replace the AfterSelectedTabChange event with SelectedIndexChanged and InitializeTabs with Initialize. Both event handlers receive two parameters – sender, which is the WebTab, and eventArgs – the event arguments object. For example:
<ClientEvents SelectedIndexChanged="onSelectedIndexChanged" />
function onSelectedIndexChanged(sender, eventArgs) {
//your code
}
You can get the selected tab like this:
var tab = $find(“WebTab1”);
var index = tab.get_selectedIndex();
var tab = tab.get_tabs()[index];
If you have any other questions on the matter, please let me know.