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/multiselect/data-binding/client-side.md
+208Lines changed: 208 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,4 +9,212 @@ position: 1
9
9
---
10
10
11
11
12
+
# Client-Side Data Binding
13
+
14
+
**RadMultiSelect** can be bound to a **web service** through its inner `WebServiceSettings` tag or through a [RadClientDataSource]({%slug clientdatasource/overview%}). Since the control is a wrapper over the Kendo UI for jQuery widget, it always operates on the client and binds to data with JavaScript.
15
+
16
+
There are two ways to bind to data on the client:
17
+
18
+
-[Client-Side Data Binding](#client-side-data-binding)
19
+
- [WebServiceSettings](#webservicesettings)
20
+
- [JavaScript Object at Runtime](#javascript-object-at-runtime)
21
+
- [See Also](#see-also)
22
+
23
+
## WebServiceSettings
24
+
25
+
Under the covers, a [Kendo UI DataSource](https://docs.telerik.com/kendo-ui/framework/datasource/overview) will be instantiated and it will perform requests to the denoted service with the settings defined in the `WebServiceSettings` tag.
26
+
RadMultiSelect has an embeded RadClientDataSource control, which can be a configured through the `WebServiceClientDatasource` composite property. The widget only shows data and so only the **Select** settings and `ServiceType` are used. The rest of the settings (for Insert, Update, Delete) will not be used and are inherited from a base class.
27
+
28
+
>caption Example 1: Setting WebServiceClientDataSource and WebServiceSettings to bind to a web service
The Schema can also be configured via the `Schema` tag. That would allow easy parsing of the response from various web services, such as .asmx web service.
You can use the `set_dataSource()`[client-side method]({%slug multicolumncombobox/client-side-programming/overview%}) of the RadMultiSelect object to provide it with a new client-side data source. You do not have to provide a server data source or a web service for this to work, you only need to define the proper configuration (columns and fields) to match the data you will pass to the widget.
<button onclick="bindToNewData();" type="button">bind to new data</button>
176
+
````
177
+
178
+
You can also create a new Kendo Data Source object with the desired settings and pass it to the RadMultiSelect. Just make sure that it matches the fields and settings you have defined.
179
+
180
+
>caption Example 4: Binding to a new Kendo DataSource instance
181
+
182
+
````ASP.NET
183
+
184
+
<script>
185
+
function bindToNewData() {
186
+
var multiSelectWidget = $find("<%=RadMultiSelect1.ClientID%>").get_kendoWidget();
187
+
//create a Kendo Data Source and set its settings
188
+
//this example calls a service, but you can also use static data
0 commit comments