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
private List<SuggestionsModel> Suggestions { get; set; } = new List<SuggestionsModel>
131
-
{
132
-
new SuggestionsModel { Suggestion = "first", SomeOtherField = 1 },
133
-
new SuggestionsModel { Suggestion = "second", SomeOtherField = 2 },
134
-
new SuggestionsModel { Suggestion = "third", SomeOtherField = 3 }
135
-
};
136
-
137
-
public class SuggestionsModel
138
-
{
139
-
public string Suggestion { get; set; }//the auto complete needs only the string field
140
-
public int SomeOtherField { get; set; }
141
-
}
142
-
}
143
-
````
144
-
145
-
### Missing Data
95
+
## Missing Data
146
96
147
97
The AutoComplete is, essentially, a textbox. This means that its `Value` is always a string and it is up to you to bind and/or use it. The `Data` parameter, however, is required for the functionality of the component, and it must never be `null`. If there are no suggestions that you wish to provide to the user, consider using a regular TextBox, or creating an empty collection.
Copy file name to clipboardExpand all lines: components/autocomplete/overview.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,9 +145,7 @@ The AutoComplete provides the following popup settings:
145
145
146
146
## AutoComplete Reference and Methods
147
147
148
-
The AutoComplete is a generic component and its type is determined by the type of the model you use as its data source. You can find examples in the [Data Bind - Considerations](slug:autocomplete-databind#considerations) article.
149
-
150
-
Add a reference to the component instance to use the [AutoComplete's methods](slug:Telerik.Blazor.Components.TelerikAutoComplete-1).
148
+
Add a reference to the component instance to use the [AutoComplete's methods](slug:Telerik.Blazor.Components.TelerikAutoComplete-1). Note that the [AutoComplete is a generic component](slug:common-features-data-binding-overview#component-type).
Copy file name to clipboardExpand all lines: components/combobox/data-bind.md
+1-59Lines changed: 1 addition & 59 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,6 @@ There are also some considerations you may find useful, such as showing the `Pla
23
23
24
24
*[Considerations](#considerations)
25
25
* [Value Out of Range](#value-out-of-range)
26
-
* [Component Reference](#component-reference)
27
26
* [Missing Value or Data](#missing-value-or-data)
28
27
29
28
## Strings and Value Types
@@ -105,7 +104,7 @@ To bind the ComboBox to a model:
105
104
106
105
## Considerations
107
106
108
-
The ComboBox component attempts to infer the type of its model and value based on the provided `Data` and initial `Value`. This affects the way its [reference is obtained](#component-reference) and what happens [if you can't provide data or a value](#missing-value-or-data). Providing a [value that is not in the data source](#value-out-of-range) needs to be taken into account be the app, because the component will not change it.
107
+
The ComboBox component attempts to infer the type of its model and value based on the provided `Data` and initial `Value`. This affects the way its [reference is obtained](slug:common-features-data-binding-overview#component-type) and what happens [if you can't provide data or a value](#missing-value-or-data). Providing a [value that is not in the data source](#value-out-of-range) needs to be taken into account by the app, because the component will not change it.
109
108
110
109
### Value Out of Range
111
110
@@ -119,63 +118,6 @@ Handling such "unexpected" values is up to the application - for example, throug
119
118
120
119
When `AllowCustom="true"`, what the user types in the input will be set to the `Value` of the component regardless of the data source.
121
120
122
-
### Component Reference
123
-
124
-
The ComboBox is a generic component and its type depends on the type of its `Data` and `Value`.
125
-
126
-
<divclass="skip-repl"></div>
127
-
````RAZOR String
128
-
@*ComboBox reference when binding to a string collection*@
.Select(x => new ComboBoxItem { MyTextField = "Item " + x, MyValueField = x });
163
-
164
-
private int ComboBoxValue { get; set; }
165
-
166
-
protected override void OnInitialized()
167
-
{
168
-
ComboBoxValue = 3;
169
-
}
170
-
171
-
public class ComboBoxItem
172
-
{
173
-
public int MyValueField { get; set; }
174
-
public string MyTextField { get; set; } = string.Empty;
175
-
}
176
-
}
177
-
````
178
-
179
121
### Missing Value or Data
180
122
181
123
In case you cannot provide strongly-typed `Value` or `Data` at compile time, you need to set the corresponding type properties to the `TItem` and `TValue` properties as shown below.
Copy file name to clipboardExpand all lines: components/combobox/overview.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,9 +145,8 @@ The ComboBox provides the following popup settings:
145
145
146
146
## ComboBox Reference and Methods
147
147
148
-
The ComboBox is a generic component and its type is determined by the type of the model you pass to it, and the type of its value field. You can find examples in the [Data Bind - Considerations](slug:components/combobox/databind#considerations) article.
148
+
Add a reference to the component instance to use the [ComboBox's methods](slug:Telerik.Blazor.Components.TelerikComboBox-2). Note that the [ComboBox is a generic component](slug:common-features-data-binding-overview#component-type).
149
149
150
-
Add a reference to the component instance to use the [ComboBox's methods](slug:Telerik.Blazor.Components.TelerikComboBox-2).
Copy file name to clipboardExpand all lines: components/dropdownlist/data-bind.md
+1-53Lines changed: 1 addition & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,6 @@ There are also some considerations you may find useful, such as showing the `Def
23
23
24
24
*[Considerations](#considerations)
25
25
*[Value Out of Range](#value-out-of-range)
26
-
*[Component Reference](#component-reference)
27
26
*[Missing Value or Data](#missing-value-or-data)
28
27
29
28
## Strings or Value Types
@@ -93,7 +92,7 @@ To bind the DropDownList to a model:
93
92
94
93
## Considerations
95
94
96
-
The DropDownList component attempts to infer the type of its model and value based on the provided `Data` and initial `Value`. This affects the way its [reference is obtained](#component-reference) and what happens [if you can't provide data or a value](#missing-value-or-data). Providing a [value that is not in the data source](#value-out-of-range) needs to be taken into account be the app, because the component will not change it.
95
+
The DropDownList component attempts to infer the type of its model and value based on the provided `Data` and initial `Value`. This affects the way its [reference is obtained](slug:common-features-data-binding-overview#component-type) and what happens [if you can't provide data or a value](#missing-value-or-data). Providing a [value that is not in the data source](#value-out-of-range) needs to be taken into account by the app, because the component will not change it.
97
96
98
97
### Value Out of Range
99
98
@@ -102,57 +101,6 @@ When the `Value` the application provides does not match any of the values prese
102
101
If you have set the `DefaultText` and the `Value` matches the `default` value of the type (for example, `0` for an `int` or `null` for an `int?` or `string`), you will see the `DefaultText`. A `Value` that is non-`default` will not show the `DefaultText`.
103
102
104
103
Handling such "unexpected" values is up to the application - for example, through defensive checks, or through form validation, or by first checking what is present in the data source before setting a new `Value`.
105
-
106
-
### Component Reference
107
-
108
-
The DropDownList is a generic component and its type depends on the type of its `Data` and `Value`.
Copy file name to clipboardExpand all lines: components/dropdownlist/overview.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -145,9 +145,8 @@ The DropDownList provides the following popup settings:
145
145
146
146
## DropDownList Reference and Methods
147
147
148
-
The DropDownList is a generic component and its type comes from the model it is bound to and from the value field type. See the [Component Reference](slug:components/dropdownlist/databind#component-reference) section in the Data Binding article for details and examples.
148
+
Add a reference to the component instance to use the [DropDownList's methods](slug:Telerik.Blazor.Components.TelerikDropDownList-2). Note that the [DropDownList is a generic component](slug:common-features-data-binding-overview#component-type).
149
149
150
-
Add a reference to the component instance to use the [DropDownList's methods](slug:Telerik.Blazor.Components.TelerikDropDownList-2).
Copy file name to clipboardExpand all lines: components/multicolumncombobox/data-bind.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ Missing selection is most common when:
53
53
54
54
## Missing Value or Data
55
55
56
-
The MultiColumnCombobox component attempts to infer the type of its model and value based on the provided `Data` and initial `Value`. This affects its [object reference](slug:multicolumncombobox-overview#component-reference-and-methods).
56
+
The MultiColumnCombobox component attempts to infer the type of its model and value based on the provided `Data` and initial `Value`. This affects its [object reference](slug:common-features-data-binding-overview#component-type).
57
57
58
58
In case you cannot provide either the `Value` or `Data` initially, you need to [set the corresponding types to the `TItem` and `TValue` parameters](slug:common-features-data-binding-overview#component-type).
Copy file name to clipboardExpand all lines: components/multicolumncombobox/overview.md
+1-5Lines changed: 1 addition & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,11 +166,7 @@ The MultiColumnComboBox provides the following popup settings:
166
166
167
167
## Component Reference and Methods
168
168
169
-
To execute MultiColumnComboBox methods, obtain reference to the component instance via `@ref`.
170
-
171
-
The MultiColumnComboBox is a generic component. Its type depends on the type of its model and the type of its `Value`. In case you cannot provide either the `Value` or `Data` initially, you need to [set the corresponding types to the `TItem` and `TValue` parameters](slug:common-features-data-binding-overview#component-type).
172
-
173
-
The table below lists the MultiComboBox methods. Also consult the [MultiColumnComboBox API](slug:Telerik.Blazor.Components.TelerikMultiColumnComboBox-2).
169
+
Add a reference to the component instance to use the [MultiColumnComboBox's methods](slug:Telerik.Blazor.Components.TelerikMultiColumnComboBox-2). Note that the [MultiColumnComboBox is a generic component](slug:common-features-data-binding-overview#component-type).
Copy file name to clipboardExpand all lines: components/multiselect/data-bind.md
+1-51Lines changed: 1 addition & 51 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,57 +128,7 @@ To bind the MultiSelect to a model:
128
128
129
129
## Considerations
130
130
131
-
The MultiSelect component attempts to infer the type of its model and value based on the provided `Data` and initial `Value`. This affects the way its [reference is obtained](#reference) and what happens [if you can't provide data or a value](#missing-value-or-data).
132
-
133
-
### Reference
134
-
135
-
The MultiSelect is a generic component and its type depends on the type of its `Data` and `Value`.
136
-
137
-
<divclass="skip-repl"></div>
138
-
````RAZOR String
139
-
@*Reference type when binding to a string collection*@
private List<MultiSelectItem> MultiSelectData { get; set; } = new List<MultiSelectItem>()
168
-
{
169
-
new MultiSelectItem { Text = "first", Value = 1 },
170
-
new MultiSelectItem { Text = "second", Value = 2 },
171
-
new MultiSelectItem { Text = "third", Value = 3 }
172
-
};
173
-
174
-
public class MultiSelectItem
175
-
{
176
-
public string Text { get; set; } = string.Empty;
177
-
178
-
public int Value { get; set; }
179
-
}
180
-
}
181
-
````
131
+
The MultiSelect component attempts to infer the type of its model and value based on the provided `Data` and initial `Value`. This affects the way its [reference is obtained](slug:common-features-data-binding-overview#component-type) and what happens [if you can't provide data or a value](#missing-value-or-data).
Copy file name to clipboardExpand all lines: components/multiselect/overview.md
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -165,9 +165,8 @@ The MultiSelect provides the following popup settings:
165
165
166
166
## MultiSelect Reference and Methods
167
167
168
-
The MultiSelect is a generic component and its type is determined by the type of the model you use as its data source. You can find examples in the [Data Bind - Considerations](slug:multiselect-databind#considerations) article.
168
+
Add a reference to the component instance to use the [MultiSelect's methods](slug:Telerik.Blazor.Components.TelerikMultiSelect-2). Note that the [MultiSelect is a generic component](slug:common-features-data-binding-overview#component-type).
169
169
170
-
Add a reference to the component instance to use the [MultiSelect's methods](slug:Telerik.Blazor.Components.TelerikMultiSelect-2).
0 commit comments