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
*[Create a JavaScript Object at Runtime](#javascript-object-at-runtime)
17
+
-[Client-Side Data Binding](#client-side-data-binding)
18
+
- [WebServiceSettings](#webservicesettings)
19
+
- [RadClientDataSource](#radclientdatasource)
20
+
- [JavaScript Object at Runtime](#javascript-object-at-runtime)
21
+
- [See Also](#see-also)
20
22
21
23
## WebServiceSettings
22
24
@@ -40,6 +42,113 @@ The widget only shows data and so only the **Select** settings and `ServiceType`
40
42
</telerik:RadMultiColumnComboBox>
41
43
````
42
44
45
+
As of R2 2019, 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.
Copy file name to clipboardExpand all lines: controls/multicolumncombobox/data-binding/server-side.md
+61-5
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,65 @@ position: 0
10
10
11
11
# Server-Side Data Binding
12
12
13
-
**RadMultiColumnComboBox** can be bound to standard server data sources like `List<T>`, `SqlDataSource` or a `DataTable`. The data from the server data source is serialized as a JSON literal to the client-side when the page loads, because RadMultiColumnComboBox is a wrapper over the Kendo UI for jQuery widget and so it always operates on the client. This includes fields that are not rendered, and they will be part of the client-side dataItem associated with each row.
13
+
**RadMultiColumnComboBox** can be bound to standard server data sources like `List<T>`, `SqlDataSource` or a `DataTable`. The data from the server data source creates MultiColumnComboBox items which are serialized as a JSON literal to the client-side. It is parsed on the client-side as the RadMultiColumnComboBox is a wrapper over the Kendo UI for jQuery widget which are entirely client-side.
14
14
15
-
>caption Example 1: Bind to an SqlDataSource
15
+
As of R2 2019, the fields that you would like to have rendered and available on the client-side should be passed to the DataKeyNames property, comma-separated. Also, you can add additional data to the items via the Attributes collection which will be serialized and available on the client-side.
16
+
17
+
>note The DataTextField, DataValueField and the Fields declared in the MultiColumnComboBoxColumns are added by default to the DataKeyNames, so it is not necessary to add them explicitly.
Copy file name to clipboardExpand all lines: controls/multicolumncombobox/functionality/templates.md
+44-8
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,15 @@ position: 1
12
12
13
13
**RadMultiColumnComboBox** uses [Kendo UI Templates](https://docs.telerik.com/kendo-ui/framework/templates/overview) to provide full control over the way pop-up items are rendered in the dropdown:
>caption Figure 1: Structure of the dropdown and where you can use templates. Produced by the code in Example 1 below.
24
26
@@ -100,7 +102,41 @@ position: 1
100
102
101
103
## Column Template
102
104
103
-
This is the template that is rendered in each individual column. It receives the `data` parameter that points to the dataItem for the corresponding item, so you can use all its data source fields.
105
+
This is the template that is rendered in each individual column. It receives the `data` parameter that points to the dataItem for the corresponding item, so you can use all its data source fields. The data from the attributes can be accessed via `attributes.AttributeKeyName` parameter.
The **ItemDataBound** event occurs for each new item that is added to the **Items** collection of the dropdownlist when it is bound. This event only occurs if the items are loaded from a data source (the **DataSource** or **DataSourceID** property is set).
18
+
19
+
For each item that is added from a data source, the following events occur:
20
+
21
+
1. A new item is created and added to the Items collection.
22
+
23
+
2. The **Text** and **Value** properties of the item are set, based on the data.
24
+
25
+
3. The **ItemDataBound** event occurs.
26
+
27
+
The **ItemDataBound** event handler receives two arguments:
28
+
29
+
1. The **RadMultiColumnComboBox** that is loading items. This argument is of type object, but can be cast to the **RadMultiColumnComboBox** type.
30
+
31
+
2. An EventArgs object. This object has an **Item** property, which provides access to the item that was just bound. This item, in turn, has a **DataItem** property, which lets you access the item in the data source to which the **RadMultiColumnComboBox** is being bound.
32
+
33
+
Use the **ItemDataBound** event handler to make changes to items as they are bound to the data. For example, you can set custom attributes based on other fields in the DataItem:
0 commit comments