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
|**trackChanges**|none|none|Begins tracking changes to the panel items. Only changes to the items that occur between a call to **trackChanges** and **commitChanges** persist after a postback.|
25
-
|**commitChanges**|none|none|Ends tracking changes to the panel items. Only changes to the items that occur between a call to **trackChanges** and **commitChanges** persist after a postback.|
24
+
|**trackChanges**|none|none|Begins tracking changes to the panel items. Only changes to the items that occur between a call to **trackChanges** and **commitChanges** persist after a postback. See **Example 1**. |
25
+
|**commitChanges**|none|none|Ends tracking changes to the panel items. Only changes to the items that occur between a call to **trackChanges** and **commitChanges** persist after a postback. Client side changes are available on the server side after postback. You can use the [ClientChanges]({%slug panelbar/client-side-programming/accessing-client-changes-on-the-server%}) property to access them. See **Example 1**. |
26
+
|**disable**| none | none | Disables all items in the panel. Clicking on any item has no effect, child items cannot be opened. See **Example 2**. |
27
+
|**enable**| none | none | Enables all items in the panel. |
28
+
|**get_enabled**| none | boolean | True if the panel is enabled. To enable a panel, use the enable() method.|
29
+
|**findItemByValue**|(string value)|[RadPanelItem]({%slug panelbar/client-side-programming/radpanelitem-object%})|Returns the first **RadPanelBarItem** object whose **Value** property is equal to the passed parameter.|
30
+
|**findItemByText**|(string text)|[RadPanelItem]({%slug panelbar/client-side-programming/radpanelitem-object%})|Returns the first **RadPanelBarItem** object whose **Text** property is equal to the passed parameter.|
31
+
|**findItemByUrl**|(string URL)|[RadPanelItem]({%slug panelbar/client-side-programming/radpanelitem-object%})|Returns the first **RadPanelBarItem** object whose **NavigateUrl** property is equal to the passed parameter.|
32
+
|**findItemByAbsoluteUrl**|(string URL)|[RadPanelItem]({%slug panelbar/client-side-programming/radpanelitem-object%})|Returns the first **RadPanelBarItem** object whose **NavigateUrl** property is equal to the passed parameter. Note that the parameter should end with '/' like:var item = sender.findItemByAbsoluteUrl('http://www.test.com/');|
33
+
|**findItemByAttribute**|(string attributeName, string value)|[RadPanelItem]({%slug panelbar/client-side-programming/radpanelitem-object%})|Returns the first **RadPanelBarItem** object with a custom attribute of the specified name that has the specified value.|
34
+
|**get_items**|none|[RadPanelItemCollection]({%slug panelbar/client-side-programming/radpanelitemcollection-object%})|Returns the collection of root level items. See **Example 3**. |
35
+
|**get_allItems**| none | Array | Gets a linear collection of all items. This includes all root and child items in the panel. See **Example 4**. |
36
+
|**get_focusedItem**| none |[RadPanelItem]({%slug panelbar/client-side-programming/radpanelitem-object%}) | Returns the focused root level item. Null if no root level item has focus. |
37
+
|**get_expandedItem**|none|[RadPanelItem]({%slug panelbar/client-side-programming/radpanelitem-object%})|Returns the last root level item that was expanded. Null if no root level items are expanded.|
38
+
|**get_expandedItems**|none|Array|Returns an array of the **RadPanelBarItem** objects for every expanded item in the panel bar (including expanded child items).|
39
+
|**get_selectedItem**|none|[RadPanelItem]({%slug panelbar/client-side-programming/radpanelitem-object%})|Returns the selected item if it exists. (It does not have to be a root level item). Null if the panel does not have a selected item.|
40
+
|**get_selectedItems**|none|Array|Returns an array containing the selected items in the panel. Because the panel bar does not allow more than one item to be selected, the array always has 0 or 1 elements.|
41
+
|**get_attributes**|none|Collection|Returns the collection of custom attributes for the panel.|
42
+
|**get_element**|none|HTML Element|Gets the DOM element for the panel. See **Example 5**. |
43
+
|**get_childListElement**| none | HTML Element | Gets the DOM element for the list of items in the panel. |
44
+
|**enableEvents**|none|none|Enables the panel bar's client-side event emitting. Events are enabled by default.|
45
+
|**disableEvents**|none|none|Disables the panel bar's client-side event emitting.|
46
+
|**add_`<EventName>`**|(mixed eventHandler)|none|Attaches an eventHandler to the event with the name `<EventName>`. Note that client-side event names differ from their server-side counterparts. For more information, see [Client-Side Events]({%slug panelbar/client-side-programming/events%}). See **Example 6**. |
47
+
|**remove_`<EventName>`**| (mixed eventHandler) | Boolean | Detaches an eventHandler from the event with the name `<EventName>`.Returns "True" if the eventHandler is found and detached, false otherwise.Note that client-side event names differ from their server-side counterparts. For more information, see [Client-Side Events]({%slug panelbar/client-side-programming/events%}). See **Example 7**. |
26
48
27
-
>tip Client side changes are available on the server side after postback. You can use the [ClientChanges]({%slug panelbar/client-side-programming/accessing-client-changes-on-the-server%}) property to access them.
28
-
>
29
49
30
50
31
-
````JavaScript
32
-
51
+
>caption Example 1: Add a new item and persist it after a postback.
|**get_enabled**| none | boolean | True if the panel is enabled. To enable a panel, use the enable() method.|
80
-
|**findItemByUrl**|(string URL)|[RadPanelItem]({%slug panelbar/client-side-programming/radpanelitem-object%})|Returns the first **RadPanelBarItem** object whose **NavigateUrl** property matches the parameter. |
81
-
82
-
>caution The **NavigateUrl** property is transformed to absolute URL on the client side, e.g. *"default.aspx"* is turned into: `http://mydomain.com/default.aspx`.
|**findItemByValue**|(string value)|[RadPanelItem]({%slug panelbar/client-side-programming/radpanelitem-object%})|Returns the first **RadPanelBarItem** object whose **Value** property is equal to the passed parameter.|
88
-
|**findItemByText**|(string text)|[RadPanelItem]({%slug panelbar/client-side-programming/radpanelitem-object%})|Returns the first **RadPanelBarItem** object whose **Text** property is equal to the passed parameter.|
89
-
|**findItemByUrl**|(string URL)|[RadPanelItem]({%slug panelbar/client-side-programming/radpanelitem-object%})|Returns the first **RadPanelBarItem** object whose **NavigateUrl** property is equal to the passed parameter.|
90
-
|**findItemByAbsoluteUrl**|(string URL)|[RadPanelItem]({%slug panelbar/client-side-programming/radpanelitem-object%})|Returns the first **RadPanelBarItem** object whose **NavigateUrl** property is equal to the passed parameter. Note that the parameter should end with '/' like:var item = sender.findItemByAbsoluteUrl('http://www.test.com/');|
91
-
|**findItemByAttribute**|(string attributeName, string value)|[RadPanelItem]({%slug panelbar/client-side-programming/radpanelitem-object%})|Returns the first **RadPanelBarItem** object with a custom attribute of the specified name that has the specified value.|
92
-
|**get_items**|none|[RadPanelItemCollection]({%slug panelbar/client-side-programming/radpanelitemcollection-object%})|Returns the collection of root level items.|
93
78
79
+
>caption Example 3: Get all root items and display their text value.
|**get_focusedItem**| none |[RadPanelItem]({%slug panelbar/client-side-programming/radpanelitem-object%}) | Returns the focused root level item. Null if no root level item has focus. |
130
-
|**get_expandedItem**|none|[RadPanelItem]({%slug panelbar/client-side-programming/radpanelitem-object%})|Returns the last root level item that was expanded. Null if no root level items are expanded.|
131
-
|**get_expandedItems**|none|Array|Returns an array of the **RadPanelBarItem** objects for every expanded item in the panel bar (including expanded child items).|
132
-
|**get_selectedItem**|none|[RadPanelItem]({%slug panelbar/client-side-programming/radpanelitem-object%})|Returns the selected item if it exists. (It does not have to be a root level item). Null if the panel does not have a selected item.|
133
-
|**get_selectedItems**|none|Array|Returns an array containing the selected items in the panel. Because the panel bar does not allow more than one item to be selected, the array always has 0 or 1 elements.|
134
-
|**get_attributes**|none|Collection|Returns the collection of custom attributes for the panel.|
135
-
|**get_element**|none|HTML Element|Gets the DOM element for the panel.|
136
-
108
+
>caption Example 5: Hide/show the **RadPanelBar**.
137
109
````JavaScript
138
110
139
111
// hide the panel
@@ -153,15 +125,7 @@ function showpanel() {
153
125
154
126
155
127
156
-
157
-
>caption
158
-
159
-
|**get_childListElement**| none | HTML Element | Gets the DOM element for the list of items in the panel. |
160
-
| ------ | ------ | ------ | ------ |
161
-
|**enableEvents**|none|none|Enables the panel bar's client-side event emitting. Events are enabled by default.|
162
-
|**disableEvents**|none|none|Disables the panel bar's client-side event emitting.|
163
-
|**add_`<EventName>`**|(mixed eventHandler)|none|Attaches an eventHandler to the event with the name `<EventName>`. Note that client-side event names differ from their server-side counterparts. For more information, see [Client-Side Events]({%slug panelbar/client-side-programming/events%}).|
164
-
128
+
>caption Example 6: Add a handler to the OnClientItemBlur event.
165
129
````JavaScript
166
130
167
131
functionOnClientItemBlurHandler() {
@@ -177,12 +141,7 @@ function AttachBlurHandler() {
|**remove_`<EventName>`**| (mixed eventHandler) | Boolean | Detaches an eventHandler from the event with the name `<EventName>`.Returns "True" if the eventHandler is found and detached, false otherwise.Note that client-side event names differ from their server-side counterparts. For more information, see [Client-Side Events]({%slug panelbar/client-side-programming/events%}). |
184
-
185
-
144
+
>caption Example 7: Remove the OnClientItemBlur event's handler.
|**findControl**|String|Object|Returns the client-side object of the Control with the specified ID nested in the Item's Template. The ID passed as an argument to the function MUST be the ID attribute of the nested Control.|
25
-
|**disable**|none|none|Disables the item.|
26
-
27
-
````JavaScript
28
-
29
-
var panelBar =$find("<%= RadPanelBar1.ClientID %>");
|**get_isEnabled**| none | Boolean | Returns true if both the item and the panelbar are enabled. If one of them is disabled, get_isEnabled() will return false. |
25
+
|**disable**|none|none|Disables the item. See **Example 1**. |
26
+
|**enable**| none | none | Enables the item if it is disabled. |
27
+
|**get_isEnabled**| none | Boolean | Returns true if both the item and the panelbar are enabled. If one of them is disabled, get_isEnabled() will return false. |
54
28
|**get_enabled**|none|Boolean|Same as get_isEnabled.|
55
29
|**set_enabled**|Boolean|none|Sets the enabled state of the item.|
56
-
|**focus**|none|none|Moves focus to the item.|
57
-
58
-
````JavaScript
59
-
60
-
var panelBar =$find("<%= RadPanelBar1.ClientID %>");
|**focusPreviousItem**| none | none | Moves focus to the previous item. |
30
+
|**focus**|none|none|Moves focus to the item. See **Example 2**. |
31
+
|**blur**| none | none | Removes focus from the item. See **Example 3**. |
32
+
|**focusPreviousItem**| none | none | Moves focus to the previous item. |
87
33
|**focusNextItem**|none|none|Moves focus to the next item.|
88
34
|**focusFirstChild**|none|none|Moves focus to the first child of the item.|
89
35
|**focusLastChild**|none|none|Moves focus to the last child of the item.|
@@ -102,30 +48,8 @@ panelItem.blur();
102
48
|**get_panelBar**|none|[RadPanelBar]({%slug panelbar/client-side-programming/radpanelbar-object%})|Returns an instance of the panel bar that contains the item.|
103
49
|**get_index**|none|Integer|Gets the zero-based index of the item inside its parent items collection.|
104
50
|**get_level**|none|Integer|Gets the level of the item. Root level items are level 0.|
105
-
|**get_attributes**|(none)|Collection|Returns the collection of custom attributes for the item.|
106
-
107
-
````JavaScript
108
-
109
-
var panelBar =$find("<%= RadPanelBar1.ClientID %>");
110
-
var foundItem =panelBar.findItemByAttribute("Population", "0");
|**set_navigateUrl**|string|none|Sets the navigateURL property of the item. This is the URL of the Web page the item launches. The **navigateUrl** property must be an absolute URL on the client side: e.g. " *http://mydomain.com/default.aspx"* not *"default.aspx".*|
146
64
|**set_imageUrl**|string|none|Sets the URL of the image.|
147
65
|**get_imageUrl**|none|string|Gets the URL of the image.|
148
66
|**set_hoveredImageUrl**|string|none|Sets the URL of the image displayed when the mouse if over the item.|
@@ -167,6 +85,61 @@ else {
167
85
|**hide**|none|none|Makes the item invisible.|
168
86
|**set_visible**|boolean|none|Shows/Hides a RadPanelItem|
169
87
88
+
89
+
90
+
91
+
>caption Example 1: Disable the item with text Paris.
92
+
````JavaScript
93
+
94
+
var panelBar =$find("<%= RadPanelBar1.ClientID %>");
95
+
var panelItem =panelBar.findItemByText("Paris");
96
+
panelItem.disable();
97
+
98
+
````
99
+
100
+
101
+
102
+
>caption Example 2: Focus the item.
103
+
````JavaScript
104
+
105
+
var panelBar =$find("<%= RadPanelBar1.ClientID %>");
106
+
var panelItem =panelBar.findItemByText("Paris");
107
+
panelItem.focus();
108
+
109
+
````
110
+
111
+
112
+
113
+
>caption Example 3: Remove the focus from the item.
114
+
````JavaScript
115
+
116
+
var panelBar =$find("<%= RadPanelBar1.ClientID %>");
117
+
var panelItem =panelBar.findItemByText("Paris");
118
+
panelItem.blur();
119
+
120
+
````
121
+
122
+
123
+
124
+
>caption Example 4: Set an item's attribute.
125
+
````JavaScript
126
+
127
+
var panelBar =$find("<%= RadPanelBar1.ClientID %>");
128
+
var foundItem =panelBar.findItemByAttribute("Population", "0");
129
+
var attributes =foundItem.get_attributes();
130
+
var size =attributes.getAttribute("size");
131
+
if (size) {
132
+
attributes.setAttribute("Population", size);
133
+
attributes.removeAttribute("size");
134
+
}
135
+
else {
136
+
attributes.setAttribute("Population", "Unknown");
137
+
}
138
+
139
+
````
140
+
141
+
142
+
170
143
# See Also
171
144
172
145
*[Client Side Overview]({%slug panelbar/client-side-programming/overview%})
0 commit comments