You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: controls/tabstrip/client-side-programming/radmultipage-object.md
+24-44Lines changed: 24 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,66 +10,55 @@ position: 5
10
10
11
11
# RadMultiPage Object
12
12
13
+
##
13
14
14
-
Telerik RadMultiPage exposes a client-side API to manage the switching of the pages. The client-side **RadMultiPage** object has a method named **get_pageViews**, which returns a RadPageViewCollection of all pageviews contained within the multipage.
15
-
16
-
17
-
## RadMultiPage client-side object
18
-
19
-
20
-
>caption
15
+
Telerik **RadMultiPage** exposes a client-side API to manage the switching of the pages. The client-side **RadMultiPage** object has a method named **get_pageViews**, which returns a RadPageViewCollection of all PageViews contained within the MultiPage.
|**get_visible**|none|Boolean|Returns true if the multipage is visible.|
19
+
|**get_visible**|none|Boolean|Returns true if the MultiPage is visible. See **Example 1**.|
20
+
|**set_visible**| Boolean | none | Shows/Hides the MultiPage. See **Example 2**. |
21
+
|**get_selectedPageView**| none | RadPageView | Returns the currently selected PageView. See **Example 3**. |
22
+
|**get_pageViews**| none | RadPageViewCollection | Returns a collection of all PageViews. See **Example 4**. |
23
+
|**findPageViewByID**| String | RadMultiPage | Gets the first RadMultiPage instance, whose id corresponds to the passed parameter. See **Example 5**. |
24
+
|**get_selectedIndex**| none | Integer | Returns the index of the selected PageView. |
25
+
|**set_selectedIndex**|Integer|none|Sets the SelectedIndex of the MultiPage.|
26
+
|**get_element**|none|HTML Element|Gets the DOM element for the MultiPage.|
25
27
26
-
````JavaScript
28
+
29
+
>caption Example 1. Retrieve visibility status of RadMultiPage
30
+
31
+
````JavaScript
27
32
var multiPage =$find("<%=RadMultiPage1.ClientID %>");
28
-
if(multiPage.get_visible())
29
-
{
33
+
if(multiPage.get_visible()) {
30
34
alert("visible");
31
-
}
32
-
else
33
-
{
35
+
} else {
34
36
alert("invisible");
35
37
}
36
38
````
37
39
38
-
>caption
39
-
40
-
|**set_visible**| Boolean | none | Shows/Hides the multipage. |
41
-
| ------ | ------ | ------ | ------ |
40
+
>caption Example 2. Toggle visibility status of RadMultiPage
42
41
43
42
````JavaScript
44
43
var multiPage =$find("<%=RadMultiPage1.ClientID %>");
45
-
if(multiPage.get_visible())
46
-
{
44
+
if(multiPage.get_visible()) {
47
45
multiPage.set_visible(false);
48
-
}
49
-
else
50
-
{
46
+
} else {
51
47
multiPage.set_visible(true);
52
48
}
53
49
````
54
50
55
-
>caption
56
-
57
-
|**get_selectedPageView**| none | RadPageView | Returns the currently selected pageview. |
58
-
| ------ | ------ | ------ | ------ |
51
+
>caption Example 3. Get selected PageView
59
52
60
-
````XML
53
+
````JavaScript
61
54
var multiPage =$find("<%=RadMultiPage1.ClientID %>");
62
55
var pageView =multiPage.get_selectedPageView();
63
-
if(pageView)
64
-
{
56
+
if(pageView) {
65
57
alert("The ID of the selected RadPageView is "+pageView.get_id());
66
58
}
67
59
````
68
60
69
-
>caption
70
-
71
-
|**get_pageViews**| none | RadPageViewCollection | Returns a collection of all pageviews. |
72
-
| ------ | ------ | ------ | ------ |
61
+
>caption Example 4. Get all PageViews
73
62
74
63
````JavaScript
75
64
var multiPage =$find("<%=RadMultiPage1.ClientID %>");
Copy file name to clipboardExpand all lines: controls/tabstrip/client-side-programming/radtab-object.md
+61-66Lines changed: 61 additions & 66 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,40 +12,17 @@ position: 2
12
12
13
13
##
14
14
15
-
The **RadTab** object is returned by the **getTab** method of the [RadTabCollection object]({%slug tabstrip/client-side-programming/radtabcollection-object%}). It is also exposed by the eventArgs of many [client-side events]({%slug tabstrip/client-side-programming/events%}). The following table lists the most important methods:
16
-
17
-
18
-
>caption
15
+
The **RadTab** object is returned by the **getTab()** method of the [RadTabCollection object]({%slug tabstrip/client-side-programming/radtabcollection-object%}). It is also exposed by the eventArgs of many [client-side events]({%slug tabstrip/client-side-programming/events%}). The following table lists the most important methods of the **RadTab** object:
|**findControl**|String|Object|Returns the client-side object of the Control with the specified ID nested in the Tab's Template. The ID passed as an argument to the function MUST be the ID attribute of the nested Control.|
23
-
|**disable**|none|none|Disables the tab.|
24
-
25
-
````JavaScript
26
-
var tabStrip =$find("<%= RadTabStrip1.ClientID %>");
27
-
var tab =tabStrip.findTabByText( "Paris");
28
-
tab.disable();
29
-
````
30
-
31
-
32
-
>caption
33
-
34
-
|**enable**| none | none | Enables the tab if it is disabled. |
35
-
| ------ | ------ | ------ | ------ |
36
-
37
-
````JavaScript
38
-
var tabStrip =$find( "<%= RadTabStrip1.ClientID %>");
39
-
var tab =tabStrip.findTabByText( "Paris");
40
-
tab.enable();
41
-
````
42
-
43
-
>caption
44
-
45
-
|**get_isEnabled**| none | Boolean | Returns true if both the tab and the tabstrip are enabled. If one of them is disabled, get_isEnabled() will return false. |
46
-
| ------ | ------ | ------ | ------ |
47
-
|**get_enabled**|none|Boolean|Same as get_isEnabled.|
48
-
|**set_enabled**|Boolean|none|Sets the enabled state of the tab.|
20
+
|**findControl**|String| Object|Returns the client-side object of the Control with the specified ID nested in the Tab's Template. The ID passed as an argument to the function MUST be the ID attribute of the nested Control.|
21
+
|**disable**|none|none| Disables the tab if it is enabled. See **Example 1**.|
22
+
|**enable**| none | none | Enables the tab if it is disabled. |
23
+
|**get_isEnabled**| none | bool | Returns true if both the tab and the tabstrip are enabled. If one of them is disabled, get_isEnabled() will return false. |
24
+
|**get_enabled**|none|bool|Same as get_isEnabled.|
25
+
|**set_enabled**|bool|none|Sets the enabled state of the tab. See **Example 2**. |
49
26
|**get_tabs**|none|RadTabCollection|Gets the child tabs of the current tab.|
50
27
|**get_nextSibling**|none|RadTab|Returns the next sibling of the tab. If the tab is last, returns null.|
51
28
|**get_previousSibling**|none|RadTab|Returns the previous sibling of the tab. If the tab is first, returns null.|
@@ -56,30 +33,8 @@ tab.enable();
56
33
|**set_pageViewID**|string|none|Sets the ID of the pageview.|
57
34
|**get_index**|none|Integer|Gets the zero based index of the tab inside the parent tabs collection.|
58
35
|**get_level**|none|Integer|Gets the level of the tab. Root level tabs are first level.|
59
-
|**get_attributes**|(none)|Collection|Returns the collection of custom attributes for the tab.|
60
-
61
-
````JavaScript
62
-
var tabStrip =$find("<%= RadTabStrip1.ClientID %>");
63
-
var foundTab =tabStrip.findTabByAttribute( "Population", "0");
|**get_visible**| none | boolean | Returns **true** if the tab is visible or **false** otherwise. |
82
-
| ------ | ------ | ------ | ------ |
36
+
|**get_attributes**|none|Collection|Returns the collection of custom attributes for the tab. See **Example 3**. |
37
+
|**get_visible**| none | boolean | Returns **true** if the tab is visible or **false** otherwise. |
83
38
|**set_visible**|boolean|none|Shows/Hides a tab.|
84
39
|**set_text**|string text|none|Sets the text of the tab.|
85
40
|**get_text**|none|string text|Returns the text of the tab.|
@@ -91,15 +46,11 @@ else
91
46
|**select**|none|none|Selects the tab.|
92
47
|**unselect**|none|none|De-selects the tab.|
93
48
|**get_navigateUrl**|none|string|Gets the URL of the Web page the tab launches.|
94
-
| **set_navigateUrl** |string|none|Sets the navigateURL property of the tab. This is the URL of the Web page the tab launches.
95
-
96
-
>caution The **navigateUrl** property must be an absolute URL on the client side: e.g., `http://mydomain.com/default.aspx" not `default.aspx`.
97
-
>
98
-
|
99
-
|**get_imageUrl**|none|(string imageUrl)|Gets the URL of the image.|
100
-
|**set_imageUrl**|(string imageUrl)|none|Sets the URL of the image.|
101
-
|**get_hoveredImageUrl**|none|(string imageUrl)|Gets the URL of the image displayed when the mouse if over the tab.|
102
-
|**set_hoveredImageUrl**|(string imageUrl)|none|Sets the URL of the image displayed when the mouse if over the tab.|
49
+
|**set_navigateUrl**|string|none|Sets the navigateURL property of the tab. This is the URL of the Web page the tab launches. The **navigateUrl** parameter should be passed as an absolute URL on the client side: e.g., `http://mydomain.com/default.aspx" not `default.aspx`. |
50
+
|**get_imageUrl**|none|string|Gets the URL of the image.|
51
+
|**set_imageUrl**|string|none|Sets the URL of the image.|
52
+
|**get_hoveredImageUrl**|none|string|Gets the URL of the image displayed when the mouse if over the tab.|
53
+
|**set_hoveredImageUrl**|string|none|Sets the URL of the image displayed when the mouse if over the tab.|
103
54
|**get_element**|none|HTML Element|Gets the root DOM element of the tab (LI).|
104
55
|**get_linkElement**|none|HTML Element|Gets the anchor DOM element of the tab(A).|
105
56
|**get_imageElement**|none|HTML Element|Gets the image DOM element of the tab. If the server side ImageUrl property is not set,returns null.|
@@ -108,9 +59,53 @@ else
108
59
|**scrollIntoView**|none|none|Scrolls to the tab.|
109
60
|**click**|none|none|Simulate user click on a tab.|
110
61
62
+
>caution Changes to the tab made using these methods do not persist after a postback unless surrounded by a call to the **trackChanges()** and the **commitChanges()** methods of the tab strip object.
63
+
>
64
+
65
+
>caption Example 1. Disable tab
66
+
67
+
````JavaScript
68
+
functiondisableTab() {
69
+
var tabStrip =$find("<%= RadTabStrip1.ClientID %>");
70
+
var tab =tabStrip.findTabByText("Paris");
71
+
tab.disable();
72
+
}
73
+
````
74
+
75
+
>caption Example 2. Enable tab
76
+
111
77
````JavaScript
112
-
var tabStrip =$find("<%=RadTabStrip1.ClientID %>");
0 commit comments