Infragistics® NetAdvantage® for ASP.NET (CLR 2.0)
WebTab Object


Glossary Item Box

UltraWebTab

Object that contains functions and member variables related to the UltraWebTab class on server. That object can be obtained by calling the igtab_getTabById function and providing the ClientID or UniqueID as a parameter.


UltraWebTab Methods

findControl

Gets reference to html element located in ContentPane of any tab.

 // Example:
 var webTab = igtab_getTabById("UltraWebTab1");
 if(webTab == null)
   return;
 var textBox1 = webTab.findControl("TextBox1");
 if(textBox1 != null)
   textBox1.value = "My new value";
          
Parameters
id

String. Value of id of html element.

Returns

Object. Reference to html element or null.

getAutoPostBack

Checks if automatic postback occurs on selected tab change event.

Returns

Boolean. True if postback is enabled.

getEnabled

Checks if control is enabled.

Returns

Boolean. True if control is enabled.

getSelectedIndex

Checks value of selected tab index.

 // Example:
 var webTab = igtab_getTabById("UltraWebTab1");
 if(webTab == null)
   return;
 var indexOfSelectedTab = webTab.getSelectedIndex();
 var tab = webTab.Tabs[indexOfSelectedTab];
          
Returns

Numeric. Index of selected tab. First tab has index 0.

getSelectedTab

Gets reference to selected tab.

 // Example:
 var webTab = igtab_getTabById("UltraWebTab1");
 if(webTab == null)
   return;
 var tab = webTab.getSelectedTab();
 if(tab != null)
   window.alert("Label of selected tab:" + tab.getText());
          
Returns

Object. Reference to selected tab or null.

getUniqueId

Obtain value of UniqueID that has UltraWebTab control on server.

Returns

String. The value of UniqueID.

setAutoPostBack

Enables or disables automatic postback. New value persists to server.

Parameters
value

Boolean. True - enable automatic postback, false - disable.

setEnabled

Enables or disables control. New value persists to server.

Parameters
value

Boolean. True - enable control, false - disable.

setSelectedIndex

Sets index of selected tab.

 // Example:
 var webTab = igtab_getTabById("UltraWebTab1");
 if(webTab == null)
   return;
 var secondTab = 1;
 webTab.setSelectedIndex(secondTab);
          
Parameters
value

Numeric. Range of values: 0..NumberOfTabs-1.

setSelectedTab

Sets selected tab.

Parameters
value

Object. That can be null, or Object which has numeric member with name index. It can be item in the Tabs member variable.

tabFromKey

Gets reference to tab object using key.

 // Example:
 var webTab = igtab_getTabById("UltraWebTab1");
 if(webTab == null)
   return;
 var serverKey = "secondTab";
 var tab = webTab.tabFromKey(serverKey);
 if(tab != null)
   window.alert("Label of tab with Key=secondTab:" + 
     tab.getText());
          
Parameters
key

String. Value of Key property of Tab assigned on server.

Returns

Object. Reference to tab or null.


UltraWebTab Properties

elemEmpty

Object. Read only. Reference to the html element that represents empty ContentPane. It can be used when there is no selected tab.

element

Object. Read only. Reference to the main html element that renders UltraWebTab.

 // Example:
 var webTab = igtab_getTabById("UltraWebTab1");
 if(webTab == null)
   return;
 var realWidthOfTab = webTab.element.offsetWidth;
          

enabled

Boolean. Read only. True if Enabled property on server is true.

Events

Object. Read only. It contains list of ClientSideEvents function names that were set to UltraWebTab on server.

 // Example:
 var webTab = igtab_getTabById("UltraWebTab1");
 if(webTab == null)
   return;
 var nameOfClickListener = webTab.Events.click;
          

ID

String. Read only. Value of internal ID which is used to identify this UltraWebTab among other objects located in igtab_all.

loadAllUrls

Boolean. Read only. True if LoadAllTargetUrl property on server is true.

previousSelectedTab

Object. Read only. Reference to previously selected tab.

 // Example:
 var webTab = igtab_getTabById("UltraWebTab1");
 if(webTab == null)
   return;
 var oldTab = webTab.previousSelectedTab;
 if(oldTab != null)
   window.alert("Label of previous tab:" + 
     oldTab.getText());
          

selected

Numeric. Read only. Index of selected tab.

tabIndex

Numeric. Read only. Value of TabIndex property on server.

Tabs

Array. Read only. It contains array of objects that represent tabs.

 // Example:
 var webTab = igtab_getTabById("UltraWebTab1");
 if(webTab == null)
   return;
 var firstTab = webTab.Tabs[0];
 window.alert("Label of 1st tab:" + 
   firstTab.getText());