diff --git a/_contentTemplates/dropdowns/adaptive-rendering.md b/_contentTemplates/dropdowns/adaptive-rendering.md
new file mode 100644
index 0000000000..7d81bba92f
--- /dev/null
+++ b/_contentTemplates/dropdowns/adaptive-rendering.md
@@ -0,0 +1,7 @@
+#intro
+The component supports different popup rendering depending on the screen size. [Read more about the Adaptive Rendering functionality and how to enable it...]({%slug adaptive-rendering%})
+#end
+
+#value-changed
+> If [`AdaptiveRendering`]({%slug adaptive-rendering%}) is enabled, on small and medium devices `ValueChanged` will fire only when the user clicks the confirmation button in the action sheet.
+#end
\ No newline at end of file
diff --git a/common-features/adaptive-rendering.md b/common-features/adaptive-rendering.md
new file mode 100644
index 0000000000..1a2ce9a50b
--- /dev/null
+++ b/common-features/adaptive-rendering.md
@@ -0,0 +1,81 @@
+---
+title: Adaptive Rendering
+page_title: Adaptive Rendering
+description: Explore how the components with popup elements can react to the changes in the
+slug: adaptive-rendering
+tags: telerik,blazor,adaptive,rendering,mobile
+published: True
+position: 0
+---
+
+# Adaptive Rendering
+
+Telerik UI for Blazor supports adaptive rendering for the components that incorporate popup elements. This functionality allows the component to adapt to the screen size by providing different rendering of the popup element based on the screen dimensions.
+
+>caption In this article:
+
+* [Supported components](#supported-components)
+* [Basics](#basics)
+* [Rendering specifics](#rendering-specifics)
+* [Limitations](#limitations)
+
+## Supported components
+
+The adaptive rendering functionality is supported by the following components:
+
+* [AutoComplete]({%slug autocomplete-overview%})
+* [ComboBox]({%slug components/combobox/overview%})
+* [DatePicker]({%slug components/datepicker/overview%})
+* [DateRangePicker]({%slug daterangepicker-overview%})
+* [DateTimePicker]({%slug components/datetimepicker/overview%})
+* [DropDownList]({%slug components/dropdownlist/overview%})
+* [MultiColumnComboBox]({%slug multicolumncombobox-overview%})
+* [MultiSelect]({%slug multiselect-overview%})
+* [TimePicker]({%slug components/timepicker/overview%})
+
+## Basics
+
+To enable the adaptive rendering use the `AdaptiveMode` parameter. It takes a member of the `AdaptiveMode` enum:
+
+* `None` (default)
+* `Auto`
+
+Optionally, you may set the `Title` parameter to provide custom header text for the popup on small and medium devices.
+
+>caption Enable the adaptive rendering
+
+````CSHTML
+// NOTE: The configurations below includes only the DropDownList, but it is applicable to all of the above listed components
+
+// Adapts to the screen size to use the appropriate rendering.
+
+````
+
+# Rendering specifics
+
+When you set the `AdaptiveMode` to `Auto`, the component will take the screen size into consideration to use the appropriate rendering. The different rendering targets the popup element of the component and how it will be displayed to the user.
+
+Three breakpoints define the rendering options as follows:
+
+@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout)
+
+|| **Small** | **Medium** | **Large** |
+|-------|-------|--------|-------|
+**Dimensions** | up to 500px | 501px to 768px | over 768px |
+**Rendering** | The popup is rendered as a fullscreen action sheet. | The popup is rendered as an action sheet docked to the bottom of the screen. | The popup is rendered as an animation container docked to the main element of the component. |
+
+## Limitations
+
+* Custom values - some of the listed components allow custom values (for example, [ComboBox]({%slug components/combobox/custom-value%}), [MultiColumnComboBox]({%slug multicolumncombobox-custom-value%})). This feature is not compatible with `AdaptiveMode.Auto`.
+
+## See also
+
+* [Live Demo: AutoComplete](https://demos.telerik.com/blazor-ui/autocomplete/adaptive)
+* [Live Demo: ComboBox](https://demos.telerik.com/blazor-ui/combobox/adaptive)
+* [Live Demo: DatePicker](https://demos.telerik.com/blazor-ui/datepicker/adaptive)
+* [Live Demo: DateRangePicker](https://demos.telerik.com/blazor-ui/daterangepicker/adaptive)
+* [Live Demo: DateTimePicker](https://demos.telerik.com/blazor-ui/datetimepicker/adaptive)
+* [Live Demo: DropDownList](https://demos.telerik.com/blazor-ui/dropdownlist/adaptive)
+* [Live Demo: MultiColumnComboBox](https://demos.telerik.com/blazor-ui/multicolumncombobox/adaptive)
+* [Live Demo: MultiSelect](https://demos.telerik.com/blazor-ui/multiselect/adaptive)
+* [Live Demo: TimePicker](https://demos.telerik.com/blazor-ui/timepicker/adaptive)
diff --git a/components/autocomplete/overview.md b/components/autocomplete/overview.md
index 5e960e2a93..49d83d6271 100644
--- a/components/autocomplete/overview.md
+++ b/components/autocomplete/overview.md
@@ -68,6 +68,10 @@ The Blazor AutoComplete @[template](/_contentTemplates/dropdowns/features.md#gro
@[template](/_contentTemplates/dropdowns/features.md#virtualization) [Read more about the Blazor AutoComplete virtualization...]({% slug autocomplete-virtualization %})
+## Adaptive Rendering
+
+@[template](/_contentTemplates/dropdowns/adaptive-rendering.md#intro)
+
## Parameters
The Blazor AutoComplete provides various parameters that allow you to configure the component:
@@ -76,20 +80,22 @@ The Blazor AutoComplete provides various parameters that allow you to configure
| Parameter | Type | Description |
| ----------- | ----------- | -------|
-| `Data` | `IEnumerable` | allows you to provide the data source. Required.
-| `DebounceDelay` | `int` 150 | Time in milliseconds between the last typed symbol and the internal `oninput` event firing. Applies when the user types and filters. Use it to balance between client-side performance and number of database queries.
+| `AdaptiveMode` | `AdaptiveMode` (`None`) | The [adaptive mode]({%slug adaptive-rendering%}) of the component. |
+| `Data` | `IEnumerable` | allows you to provide the data source. Required. |
+| `DebounceDelay` | `int` 150 | Time in milliseconds between the last typed symbol and the internal `oninput` event firing. Applies when the user types and filters. Use it to balance between client-side performance and number of database queries. |
| `Enabled` | `bool` | Whether the component is enabled. |
| `Filterable` | `bool` | Whether [filtering]({%slug multiselect-filter%}) is enabled for the end user (suggestions will get narrowed down as they type). |
| `FilterOperator` | `StringFilterOperator` (`StartsWith`) | The string operation that will be used for [filtering]({%slug multiselect-filter%}). |
| `Id` | `string` | Renders as the `id` attribute on the ` ` element, so you can attach a `` to the input.|
-| `TItem` | `Type` | The type of the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object.|
+| `TItem` | `Type` | The type of the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object. |
+| `Title` | `string` | The title text rendered in the header of the popup(action sheet). Applicable only when [`AdaptiveMode` is set to `Auto`]({%slug adaptive-rendering%}). |
| `Value` and `bind-Value` | `string` | Get/set the value of the component, can be used for binding. Use the `@bind-Value` syntax for two-way binding, for example, to a variable of your own. The `Value` must be a `string`.|
-| `ValueField` | `string` (`Value`) | The name of the field from the model that will be shown as hints to the user. Not required when binding to a simple list of strings.|
-| `TabIndex` | `int?` | Maps to the `tabindex` attribute of the HTML element. You can use it to customize the order in which the inputs in your form focus with the `Tab` key.|
-| `ClearButton` | `bool` | Whether the user will have the option to clear the selected value with a button on the input. When it is clicked, the `Value` will be updated to `string.Empty`.|
-| `Enabled` | `bool` | Use this Boolean property to render a disabled Blazor AutoComplete component until certain requirements are met.|
-| `MinLength` | `int` | How many characters the text has to be before the suggestions list appears. Cannot be `0`. Often works together with [filtering]({%slug autocomplete-filter%}).|
-| `Placeholder` | `string` | The text the user sees as a hint when there is no text in the input. In order for it to be shown, the `Value` parameter should be set to the default value for string (`null`).|
+| `ValueField` | `string` (`Value`) | The name of the field from the model that will be shown as hints to the user. Not required when binding to a simple list of strings. |
+| `TabIndex` | `int?` | Maps to the `tabindex` attribute of the HTML element. You can use it to customize the order in which the inputs in your form focus with the `Tab` key. |
+| `ClearButton` | `bool` | Whether the user will have the option to clear the selected value with a button on the input. When it is clicked, the `Value` will be updated to `string.Empty`. |
+| `Enabled` | `bool` | Use this Boolean property to render a disabled Blazor AutoComplete component until certain requirements are met. |
+| `MinLength` | `int` | How many characters the text has to be before the suggestions list appears. Cannot be `0`. Often works together with [filtering]({%slug autocomplete-filter%}). |
+| `Placeholder` | `string` | The text the user sees as a hint when there is no text in the input. In order for it to be shown, the `Value` parameter should be set to the default value for string (`null`). |
### Styling and Appearance
diff --git a/components/combobox/custom-value.md b/components/combobox/custom-value.md
index de0d3c1eda..97b9b10679 100644
--- a/components/combobox/custom-value.md
+++ b/components/combobox/custom-value.md
@@ -101,7 +101,9 @@ Selected value: @selectedValue
}
````
+## Limitations
+* `AllowCustom` is not compatible with [Adaptive rendering]({%slug adaptive-rendering%}).
## See Also
diff --git a/components/combobox/overview.md b/components/combobox/overview.md
index 31cae5a01f..d18b724583 100644
--- a/components/combobox/overview.md
+++ b/components/combobox/overview.md
@@ -69,6 +69,9 @@ The Blazor ComboBox @[template](/_contentTemplates/dropdowns/features.md#groupin
@[template](/_contentTemplates/dropdowns/features.md#virtualization) [Read more about the Blazor ComboBox virtualization...]({% slug combobox-virtualization %})
+## Adaptive Rendering
+
+@[template](/_contentTemplates/dropdowns/adaptive-rendering.md#intro)
## Parameters
@@ -78,21 +81,23 @@ The Blazor ComboBox @[template](/_contentTemplates/dropdowns/features.md#groupin
| Parameter | Type | Description
| ----------- | ----------- | -----------|
-| `AllowCustom` | `bool` | whether the user can enter [custom values]({%slug components/combobox/custom-value%}). If enabled, the `ValueField` must be a `string`.
-| `ClearButton` | `bool` | whether the user will have the option to clear the selected value. When it is clicked, the `Value` will be updated to `default(TValue)`, so there must be no item in the `Data` that has such a `Value`. For example, if `TValue` is `int`, clearing the value will lead to a `0` `Value`, so if there is an Item with `0` in its `ValueField` - issues may arise with its selection. This feature can often go together with `AllowCustom`.
-| `Data` | `IEnumerable` | allows you to provide the data source. Required.
-| `DebounceDelay` | `int` 150 | Time in milliseconds between the last typed symbol and the internal `oninput` event firing. Applies when the user types and filters. Use it to balance between client-side performance and number of database queries.
-| `Enabled` | `bool` | whether the component is enabled.
-|`Filterable` | `bool` | whether [filtering]({%slug components/combobox/filter%}) is enabled for the end user.
-| `FilterOperator` | `StringFilterOperator` (`StartsWith`) | the method of [filtering]({%slug components/combobox/filter%}) the items.
-| `Id` | `string` | renders as the `id` attribute on the ` ` element, so you can attach a `` to the input.
-| `Placeholder` | `string` | the text the user sees as a hint when no item is selected. In order for it to be shown, the `Value` parameter should be set to a default value depending on the type defined in the `ValueField` parameter. For example, `0` for an `int`, and `null` for an `int?` or `string`. You need to make sure that it does not match the value of an existing item in the data source.
-| `TItem` | `Type` | the type of the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object.
-| `TValue` | `Type` | the type of the value field from the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object. The type of the values can be: - `number` (such as `int`, `double`, and so on) - `string` - `Guid` - `Enum`|
-| `TextField` | `string` (`Text`)| the name of the field from the model that will be shown to the user.
-| `ValueField` | `string` (`Value`) | the name of the field from the model that will be the underlying `value`.
-| `Value` and `bind-Value` | `TValue` | get/set the value of the component, can be used for binding. If you set it to a value allowed by the model class value field, the corresponding item from the data collection will be pre-selected. Use the `bind-Value` syntax for two-way binding, for example, to a variable of your own.
-| `TabIndex` | `int?` | maps to the `tabindex` attribute of the HTML element. You can use it to customize the order in which the inputs in your form focus with the `Tab` key.
+| `AdaptiveMode` | `AdaptiveMode` (`None`) | The [adaptive mode]({%slug adaptive-rendering%}) of the component. |
+| `AllowCustom` | `bool` | whether the user can enter [custom values]({%slug components/combobox/custom-value%}). If enabled, the `ValueField` must be a `string`. |
+| `ClearButton` | `bool` | whether the user will have the option to clear the selected value. When it is clicked, the `Value` will be updated to `default(TValue)`, so there must be no item in the `Data` that has such a `Value`. For example, if `TValue` is `int`, clearing the value will lead to a `0` `Value`, so if there is an Item with `0` in its `ValueField` - issues may arise with its selection. This feature can often go together with `AllowCustom`. |
+| `Data` | `IEnumerable` | allows you to provide the data source. Required. |
+| `DebounceDelay` | `int` 150 | Time in milliseconds between the last typed symbol and the internal `oninput` event firing. Applies when the user types and filters. Use it to balance between client-side performance and number of database queries. |
+| `Enabled` | `bool` | whether the component is enabled. |
+|`Filterable` | `bool` | whether [filtering]({%slug components/combobox/filter%}) is enabled for the end user. |
+| `FilterOperator` | `StringFilterOperator` (`StartsWith`) | the method of [filtering]({%slug components/combobox/filter%}) the items. |
+| `Id` | `string` | renders as the `id` attribute on the ` ` element, so you can attach a `` to the input. |
+| `Placeholder` | `string` | the text the user sees as a hint when no item is selected. In order for it to be shown, the `Value` parameter should be set to a default value depending on the type defined in the `ValueField` parameter. For example, `0` for an `int`, and `null` for an `int?` or `string`. You need to make sure that it does not match the value of an existing item in the data source. |
+| `TItem` | `Type` | the type of the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object. |
+| `TValue` | `Type` | the type of the value field from the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object. The type of the values can be: - `number` (such as `int`, `double`, and so on) - `string` - `Guid` - `Enum` |
+| `Title` | `string` | The title text rendered in the header of the popup(action sheet). Applicable only when [`AdaptiveMode` is set to `Auto`]({%slug adaptive-rendering%}). |
+| `TextField` | `string` (`Text`)| the name of the field from the model that will be shown to the user. |
+| `ValueField` | `string` (`Value`) | the name of the field from the model that will be the underlying `value`. |
+| `Value` and `bind-Value` | `TValue` | get/set the value of the component, can be used for binding. If you set it to a value allowed by the model class value field, the corresponding item from the data collection will be pre-selected. Use the `bind-Value` syntax for two-way binding, for example, to a variable of your own. |
+| `TabIndex` | `int?` | maps to the `tabindex` attribute of the HTML element. You can use it to customize the order in which the inputs in your form focus with the `Tab` key. |
### Styling and Appearance
diff --git a/components/datepicker/events.md b/components/datepicker/events.md
index e2f607bbb9..f24099df9a 100644
--- a/components/datepicker/events.md
+++ b/components/datepicker/events.md
@@ -12,44 +12,41 @@ position: 20
This article explains the events available in the Telerik DatePicker for Blazor:
-* [OnChange](#onchange)
* [ValueChanged](#valuechanged)
+* [OnChange](#onchange)
* [OnOpen](#onopen)
* [OnClose](#onclose)
* [OnBlur](#onblur)
* [OnCalendarCellRender](#oncalendarcellrender)
-## OnChange
-The `OnChange` event represents a user action - confirmation of the current value. It fires when the user presses `Enter` in the input, or when the input loses focus.
+## ValueChanged
-The date picker is a generic component, so you must provide either a `Value`, or a type to the `T` parameter of the component.
+The `ValueChanged` event fires upon every change (for example, keystroke) in the input.
->caption Handle OnChange
+>caption Handle ValueChanged
````CSHTML
@result
-
+
@code {
string result;
- private void MyOnChangeHandler(object theUserInput)
+ private void MyValueChangeHandler(DateTime theUserInput)
{
- // the handler receives an object that you may need to cast to the type of the component
- // if you do not provide a Value, you must provide the Type parameter to the component
- result = string.Format("The user entered: {0:dd/MMM/yyyy}", (DateTime)theUserInput);
+ result = string.Format("The user entered: {0}", theUserInput);
}
}
````
@[template](/_contentTemplates/common/general-info.md#event-callback-can-be-async)
->tip The `OnChange` event is a custom event and does not interfere with bindings, so you can use it together with models and forms.
+@[template](/_contentTemplates/common/issues-and-warnings.md#valuechanged-lambda-required)
->caption Handle OnChange and use two-way binding
+>caption Handle ValueChanged and provide initial value
````CSHTML
@result
@@ -57,49 +54,54 @@ The date picker is a generic component, so you must provide either a `Value`, or
model value: @thePickerValue
-
+
@code {
string result;
- DateTime? thePickerValue { get; set; } = DateTime.Now;
+ DateTime thePickerValue { get; set; } = DateTime.Now;
- private void MyOnChangeHandler(object theUserInput)
+ private void MyValueChangeHandler(DateTime theUserInput)
{
- // the handler receives an object that you may need to cast to the type of the component
- // if you do not provide a Value, you must provide the Type parameter to the component
- result = string.Format("The user entered: {0:dd/MMM/yyyy}", (theUserInput as DateTime?).Value);
+ result = string.Format("The user entered: {0:dd/MMM/yyyy}", theUserInput);
+
+ //you have to update the model manually because handling the ValueChanged event does not let you use @bind-Value
+ thePickerValue = theUserInput;
}
}
````
-## ValueChanged
+## OnChange
-The `ValueChanged` event fires upon every change (for example, keystroke) in the input.
+The `OnChange` event represents a user action - confirmation of the current value. It fires when the user presses `Enter` in the input, or when the input loses focus.
->caption Handle ValueChanged
+The date picker is a generic component, so you must provide either a `Value`, or a type to the `T` parameter of the component.
+
+>caption Handle OnChange
````CSHTML
@result
-
+
@code {
string result;
- private void MyValueChangeHandler(DateTime theUserInput)
+ private void MyOnChangeHandler(object theUserInput)
{
- result = string.Format("The user entered: {0}", theUserInput);
+ // the handler receives an object that you may need to cast to the type of the component
+ // if you do not provide a Value, you must provide the Type parameter to the component
+ result = string.Format("The user entered: {0:dd/MMM/yyyy}", (DateTime)theUserInput);
}
}
````
@[template](/_contentTemplates/common/general-info.md#event-callback-can-be-async)
-@[template](/_contentTemplates/common/issues-and-warnings.md#valuechanged-lambda-required)
+>tip The `OnChange` event is a custom event and does not interfere with bindings, so you can use it together with models and forms.
->caption Handle ValueChanged and provide initial value
+>caption Handle OnChange and use two-way binding
````CSHTML
@result
@@ -107,19 +109,18 @@ The `ValueChanged` event fires upon every change (for example, keystroke) in the
model value: @thePickerValue
-
+
@code {
string result;
- DateTime thePickerValue { get; set; } = DateTime.Now;
+ DateTime? thePickerValue { get; set; } = DateTime.Now;
- private void MyValueChangeHandler(DateTime theUserInput)
+ private void MyOnChangeHandler(object theUserInput)
{
- result = string.Format("The user entered: {0:dd/MMM/yyyy}", theUserInput);
-
- //you have to update the model manually because handling the ValueChanged event does not let you use @bind-Value
- thePickerValue = theUserInput;
+ // the handler receives an object that you may need to cast to the type of the component
+ // if you do not provide a Value, you must provide the Type parameter to the component
+ result = string.Format("The user entered: {0:dd/MMM/yyyy}", (theUserInput as DateTime?).Value);
}
}
````
diff --git a/components/datepicker/overview.md b/components/datepicker/overview.md
index a6cf274d8a..38c3d1e3ce 100644
--- a/components/datepicker/overview.md
+++ b/components/datepicker/overview.md
@@ -55,6 +55,10 @@ You can ensure that the component value is acceptable by using the built-in vali
The DatePicker allows you to customize the rendering of the Calendar popup header. Learn more from the [Header Template article]({%slug datepicker-header-template%}).
+## Adaptive Rendering
+
+@[template](/_contentTemplates/dropdowns/adaptive-rendering.md#intro)
+
## Date Picker Parameters
The Blazor Date Picker provides various parameters that allow you to configure the component:
@@ -63,6 +67,7 @@ The Blazor Date Picker provides various parameters that allow you to configure t
| Attribute | Type and Default Value | Description |
|---|---|---|
+| `AdaptiveMode` | `AdaptiveMode` enum (`None`) | The [adaptive mode]({%slug adaptive-rendering%}) of the component. |
| `AutoComplete` | `string` (`"off"`) | The `autocomplete` HTML attribute of the `input`. |
| `BottomView` | ` CalendarView` enum (`Month`) | Defines the bottommost view in the popup calendar to which the user can navigate to. |
| `DebounceDelay` | `int` (`150`) | Time in milliseconds between the last typed symbol and the value update. Use it to balance between client-side performance and number of database queries. |
@@ -72,9 +77,10 @@ The Blazor Date Picker provides various parameters that allow you to configure t
| `Id` | `string` | The `id` attribute on the ` ` element. Use it to attach a `` to the input. |
| `Max` | `DateTime` | The latest date that the user can select. |
| `Min` | `DateTime` | The earliest date that the user can select. |
-| `TabIndex` | `int?` | The `tabindex` attribute of the HTML element. You can use it to customize the order in which the inputs in your form focus with the `Tab` key. |
-| `Placeholder` | `string` | The `placeholder` attribute of the HTML element. The placeholder will appear if the component is bound to a **nullable** DateTime object - `DateTime?`. It will not be rendered if the component is bound to the default value of a non-nullable DateTime object. The Placeholder value will be displayed when the input is not focused. Once the user focuses it to start typing, the Format Placeholder (default or [customized one](#format-placeholder)) will override the Placeholder to indicate the format the date should be entered in. |
-| `ValidateOn` | `ValidationEvent` enum (`Input`) | Configures the event that will trigger validation (if validation is enabled). Read more at [Validation Modes for Simple Inputs]({%slug common-features/input-validation%}#validation-modes-for-simple-inputs). |
+| `TabIndex` | `int?` | Maps to the `tabindex` attribute of the HTML element. You can use it to customize the order in which the inputs in your form focus with the `Tab` key. |
+| `Title` | `string` | The title text rendered in the header of the popup(action sheet). Applicable only when [`AdaptiveMode` is set to `Auto`]({%slug adaptive-rendering%}). |
+| `Placeholder` | `string` | Maps to the `placeholder` attribute of the HTML element. The `Placeholder` will appear if the component is bound to a **nullable** DateTime object - `DateTime?`. It will not be rendered if the component is bound to the default value of a non-nullable DateTime object. The Placeholder value will be displayed when the input is not focused. Once the user focuses it to start typing, the Format Placeholder (default or [customized one](#format-placeholder)) will override the Placeholder to indicate the format the date should be entered in. |
+| `ValidateOn` |`ValidationEvent` enum (`Input`) | Configures the event that will trigger validation (if validation is enabled). Read more at [Validation Modes for Simple Inputs]({%slug common-features/input-validation%}#validation-modes-for-simple-inputs). |
| `Value` | `DateTime` or `DateTime?` | The current value of the component. Supports two-way binding. |
| `View` | ` CalendarView` enum (`Month`) | The current view that will be displayed in the popup calendar. |
diff --git a/components/daterangepicker/events.md b/components/daterangepicker/events.md
index 2eee918090..a24dc7fa9e 100644
--- a/components/daterangepicker/events.md
+++ b/components/daterangepicker/events.md
@@ -13,50 +13,14 @@ position: 20
This article explains the events available in the Telerik DateRangePicker for Blazor:
-* [OnChange](#onchange)
* [StartValueChanged and EndValueChanged](#startvaluechanged-and-endvaluechanged)
+* [OnChange](#onchange)
* [OnOpen](#onopen)
* [OnClose](#onclose)
* [ViewChanged](#viewchanged)
* [OnCalendarCellRender](#oncalendarcellrender)
-## OnChange
-
-The `OnChange` event represents a user action - confirmation of the current value. It fires when the user presses `Enter` in the input, or when the input loses focus. The focus will also be lost when the user starts clicking in the calendar popup.
-
->caption Handle OnChange
-
-````CSHTML
-@StartValue?.ToString("dd MMM yyyy")
-
-@EndValue?.ToString("dd MMM yyyy")
-
-
-
-
-@code {
- public DateTime? StartValue { get; set; } = DateTime.Now;
- public DateTime? EndValue { get; set; } = DateTime.Now.AddDays(10);
-
- async Task OnChangeHandler(DateRangePickerChangeEventArgs e)
- {
- Console.WriteLine($"The range is from {e.StartValue} to {e.EndValue}");
-
- // the fields are of type object because you can use nullable or non-nullable DateTime
- // so you may need to cast them if you want to use the actual DateTime objects
- }
-}
-````
-
-@[template](/_contentTemplates/common/general-info.md#event-callback-can-be-async)
-
->tip The `OnChange` event is a custom event and does not interfere with bindings, so you can use it together with models and forms.
-
-
-
## StartValueChanged and EndValueChanged
The two `ValueChanged` events (`StartValueChanged` and `EndValueChanged`) fire when the user selects a new range.
@@ -67,6 +31,8 @@ When the user selects a range from the calendar popup, the first click always fi
>note The user can only type in the inputs and that will fire the corresponding event. Selecting from the calendar popup also fires the event. There is no way to know what the user intent is when they start modifying the values - whether they will modify one or both, so there is no definitive way to know when the user has finished using the component. Such logic is heuristic and is up to the application.
+> If [`AdaptiveRendering`]({%slug adaptive-rendering%}) is enabled, on small and medium devices `StartValueChanged` and `EndValueChanged` will fire only when the user clicks the confirmation button in the action sheet.
+
>caption Handle StartValueChanged and EndValueChanged
````CSHTML
@@ -113,6 +79,34 @@ When the user selects a range from the calendar popup, the first click always fi
@[template](/_contentTemplates/common/issues-and-warnings.md#valuechanged-lambda-required)
+## OnChange
+
+The `OnChange` event represents a user action - confirmation of the current value. It fires when the user presses `Enter` in the input, or when the input loses focus. The focus will also be lost when the user starts clicking in the calendar popup.
+
+>caption Handle OnChange
+
+````CSHTML
+@StartValue?.ToString("dd MMM yyyy")
+
+@EndValue?.ToString("dd MMM yyyy")
+
+
+
+
+@code {
+ public DateTime? StartValue { get; set; } = DateTime.Now;
+ public DateTime? EndValue { get; set; } = DateTime.Now.AddDays(10);
+
+ async Task OnChangeHandler(DateRangePickerChangeEventArgs e)
+ {
+ Console.WriteLine($"The range is from {e.StartValue} to {e.EndValue}");
+
+ // the fields are of type object because you can use nullable or non-nullable DateTime
+ // so you may need to cast them if you want to use the actual DateTime objects
+
+
## OnOpen
The `OnOpen` event fires before the DateRangePicker popup renders.
@@ -147,6 +141,10 @@ The event handler receives as an argument an `DateRangePickerOpenEventArgs` obje
}
````
+@[template](/_contentTemplates/common/general-info.md#event-callback-can-be-async)
+
+>tip The `OnChange` event is a custom event and does not interfere with bindings, so you can use it together with models and forms.
+
## OnClose
The `OnClose` event fires before the DateRangePicker popup closes.
diff --git a/components/daterangepicker/overview.md b/components/daterangepicker/overview.md
index f7f1527e46..7bdb964a4f 100644
--- a/components/daterangepicker/overview.md
+++ b/components/daterangepicker/overview.md
@@ -54,6 +54,10 @@ To restrict the user from writing dates in the input so that the end is after th
The DateRangePicker allows you to customize the rendering of the Calendar popup header. Learn more from the [Header Template article]({%slug daterangepicker-header-template%}).
+## Adaptive Rendering
+
+@[template](/_contentTemplates/dropdowns/adaptive-rendering.md#intro)
+
## DateRangePicker Parameters
The Blazor Date Range Picker provides various parameters that allow you to configure the component. Also check the [DateRangePicker's public API](/blazor-ui/api/Telerik.Blazor.Components.TelerikDateRangePicker-1).
@@ -62,18 +66,20 @@ The Blazor Date Range Picker provides various parameters that allow you to confi
| Attribute | Type and Default Value | Description |
|----------|----------|----------|
+| `AdaptiveMode` | `AdaptiveMode` (`None`) | The [adaptive mode]({%slug adaptive-rendering%}) of the component. |
| `BottomView` | ` CalendarView` enum (`Month`) | Defines the bottommost view in the popup calendar to which the user can navigate to. |
| `DebounceDelay` | `int` (`150`) | Time in milliseconds between the last typed symbol and the value update. Use it to balance between client-side performance and number of database queries. |
| `DisabledDates` | `List` | A list of dates that can not be selected as the start or end of the range. See the Live Demo: Date Range Picker Disabled Dates . |
| `Enabled` | `bool` | Whether typing in the inputs is allowed. |
| `Format` | `string` | The format of the DateInputs of the DateRangePicker. [Read more about supported data formats in Telerik DateInput for Blazor UI]({%slug components/dateinput/supported-formats%}) article. |
-|`EndId` and `StartId` | `string` | The `id` attribute on the ` ` element, so you can attach a `` to the input. |
+| `EndId` and `StartId` | `string` | The `id` attribute on the ` ` element, so you can attach a `` to the input. |
| `Min` | `DateTime` | The earliest date that the user can select. |
| `Max` | `DateTime` | The latest date that the user can select. |
| `Orientation` | `CalendarOrientation`enum (`Horizontal`) | The orientation of the calendar popup. The available options are `Horizontal` and `Vertical`. |
| `StartValue` and `EndValue` | `T` | The current values of the inputs for start and end of the range. Can be used for two-way binding. |
| `View` | ` CalendarView` enum (`Month`) | The current view that will be displayed in the popup calendar. |
| `TabIndex` | `int?` | The `tabindex` attribute of both `input` HTML elements in the component. They both will have the same `tabindex`. Use it to customize the tabbing (focus) order of the inputs on your page. |
+| `Title` | `string` | The title text rendered in the header of the popup(action sheet). Applicable only when [`AdaptiveMode` is set to `Auto`]({%slug adaptive-rendering%}). |
| `Placeholder` |`string` | The `placeholder` attribute of the two ` ` elements. The `Placeholder` will appear if the component is bound to **nullable** DateTime objects - `DateTime?`, but will not be rendered if the component is bound to the default value of a non-nullable DateTime objects. The Placeholder value will be displayed when the input is not focused. Once the user focuses it to start typing, the Format Placeholder (default or [customized one](#format-placeholder)) will override the Placeholder to indicate the format the date should be entered in. |
The date range picker is, essentially, a [date input]({%slug components/dateinput/overview%}) and a [calendar]({%slug components/calendar/overview%}) and the properties it exposes are mapped to the corresponding properties of these two components. You can read more about their behavior in the respective components' documentation.
diff --git a/components/datetimepicker/events.md b/components/datetimepicker/events.md
index c5e43b029f..0ad071207c 100644
--- a/components/datetimepicker/events.md
+++ b/components/datetimepicker/events.md
@@ -12,45 +12,41 @@ position: 20
This article explains the events available in the Telerik DateTimePicker for Blazor:
-* [OnChange](#onchange)
* [ValueChanged](#valuechanged)
+* [OnChange](#onchange)
* [OnOpen](#onopen)
* [OnClose](#onclose)
* [OnBlur](#onblur)
* [OnCalendarCellRender](#oncalendarcellrender)
-## OnChange
-
-The `OnChange` event represents a user action - confirmation of the current value. It fires when the user presses `Enter` in the input, or when the input loses focus.
+## ValueChanged
-The datetime picker is a generic component, so you must provide either a `Value`, or a type to the `T` parameter of the component.
+The `ValueChanged` event fires upon every change (for example, keystroke) in the input, and upon clicking the `Set` or `Now` buttons in the time dropdown.
->caption Handle OnChange
+>caption Handle ValueChanged
````CSHTML
@result
-
+
@code {
string result;
- private void MyOnChangeHandler(object theUserInput)
+ private void MyValueChangeHandler(DateTime theUserInput)
{
- // the handler receives an object that you may need to cast to the type of the component
- // if you do not provide a Value, you must provide the Type parameter to the component
- result = string.Format("The user entered: {0}", (DateTime)theUserInput);
+ result = string.Format("The user entered: {0}", theUserInput);
}
}
````
@[template](/_contentTemplates/common/general-info.md#event-callback-can-be-async)
->tip The `OnChange` event is a custom event and does not interfere with bindings, so you can use it together with models and forms.
+@[template](/_contentTemplates/common/issues-and-warnings.md#valuechanged-lambda-required)
->caption Handle OnChange and use two-way binding
+>caption Handle ValueChanged and provide initial value
````CSHTML
@result
@@ -58,50 +54,54 @@ The datetime picker is a generic component, so you must provide either a `Value`
model value: @thePickerValue
-
+
@code {
string result;
- DateTime? thePickerValue { get; set; } = DateTime.Now;
+ DateTime thePickerValue { get; set; } = DateTime.Now;
- private void MyOnChangeHandler(object theUserInput)
+ private void MyValueChangeHandler(DateTime theUserInput)
{
- // the handler receives an object that you may need to cast to the type of the component
- // if you do not provide a Value, you must provide the Type parameter to the component
- result = string.Format("The user entered: {0}", (theUserInput as DateTime?).Value);
+ result = $"The user entered: {theUserInput}";
+
+ //you have to update the model manually because handling the ValueChanged event does not let you use @bind-Value
+ thePickerValue = theUserInput;
}
}
````
+## OnChange
-## ValueChanged
+The `OnChange` event represents a user action - confirmation of the current value. It fires when the user presses `Enter` in the input, or when the input loses focus.
-The `ValueChanged` event fires upon every change (for example, keystroke) in the input, and upon clicking the `Set` or `Now` buttons in the time dropdown.
+The datetime picker is a generic component, so you must provide either a `Value`, or a type to the `T` parameter of the component.
->caption Handle ValueChanged
+>caption Handle OnChange
````CSHTML
@result
-
+
@code {
string result;
- private void MyValueChangeHandler(DateTime theUserInput)
+ private void MyOnChangeHandler(object theUserInput)
{
- result = string.Format("The user entered: {0}", theUserInput);
+ // the handler receives an object that you may need to cast to the type of the component
+ // if you do not provide a Value, you must provide the Type parameter to the component
+ result = string.Format("The user entered: {0}", (DateTime)theUserInput);
}
}
````
@[template](/_contentTemplates/common/general-info.md#event-callback-can-be-async)
-@[template](/_contentTemplates/common/issues-and-warnings.md#valuechanged-lambda-required)
+>tip The `OnChange` event is a custom event and does not interfere with bindings, so you can use it together with models and forms.
->caption Handle ValueChanged and provide initial value
+>caption Handle OnChange and use two-way binding
````CSHTML
@result
@@ -109,19 +109,18 @@ The `ValueChanged` event fires upon every change (for example, keystroke) in the
model value: @thePickerValue
-
+
@code {
string result;
- DateTime thePickerValue { get; set; } = DateTime.Now;
+ DateTime? thePickerValue { get; set; } = DateTime.Now;
- private void MyValueChangeHandler(DateTime theUserInput)
+ private void MyOnChangeHandler(object theUserInput)
{
- result = $"The user entered: {theUserInput}";
-
- //you have to update the model manually because handling the ValueChanged event does not let you use @bind-Value
- thePickerValue = theUserInput;
+ // the handler receives an object that you may need to cast to the type of the component
+ // if you do not provide a Value, you must provide the Type parameter to the component
+ result = string.Format("The user entered: {0}", (theUserInput as DateTime?).Value);
}
}
````
diff --git a/components/datetimepicker/overview.md b/components/datetimepicker/overview.md
index c38c6d804f..526a4ed3c4 100644
--- a/components/datetimepicker/overview.md
+++ b/components/datetimepicker/overview.md
@@ -54,12 +54,19 @@ When using the dropdown to edit dates, you must click the "Set" button to commit
The time format specifiers in the `Format` control the tumblers available in the dropdown. For example, the `HH` specifier will result in a hour selector in a 24 hour format. If you also add the `tt` specifier, you will also get the AM/PM tumbler, but the 24 hour format will still be used. This means that you can also add several tumblers for the same time portion if the format string repeats them.
+## Adaptive Rendering
+
+@[template](/_contentTemplates/dropdowns/adaptive-rendering.md#intro)
+
## DateTime Picker Parameters
+The Blazor Date Time Picker provides various parameters that allow you to configure the component. Also check the [DateTimePicker's public API](/blazor-ui/api/Telerik.Blazor.Components.TelerikDateTimePicker-1).
+
@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout)
| Attribute | Type and Default Value | Description |
|---|---|---|
+| `AdaptiveMode` | `AdaptiveMode` (`None`) | The [adaptive mode]({%slug adaptive-rendering%}) of the component. |
| `AutoComplete` | `string` (`"off"`) | The `autocomplete` HTML attribute of the `input`. |
| `DebounceDelay` | `int` (`150`) | Time in milliseconds between the last typed symbol and the value update. Use it to balance between client-side performance and number of database queries. |
| `Enabled` | `bool` | Defines if the `DateTimePicker` is enabled |
diff --git a/components/dropdownlist/events.md b/components/dropdownlist/events.md
index e7b0c63479..3a08678b63 100644
--- a/components/dropdownlist/events.md
+++ b/components/dropdownlist/events.md
@@ -12,47 +12,15 @@ position: 35
This article explains the events available in the Telerik DropDownList for Blazor:
-* [OnChange](#onchange)
* [ValueChanged](#valuechanged)
+* [OnChange](#onchange)
* [OnRead](#onread)
* [OnOpen](#onopen)
* [OnClose](#onclose)
* [OnItemRender](#onitemrender)
* [OnBlur](#onblur)
-## OnChange
-
-The `OnChange` event represents a user action - confirmation of the current value. In inputs, it fires when the user presses `Enter` in the input, or when the input loses focus. In the DropDownList, it fires when the user selects an item as well. See [here]({%slug ddl-kb-onchange-fires-twice%}) for sample logic on executing it only once per value selection.
-
->tip The `OnChange` event is a custom event and does not interfere with bindings, so you can use it together with models and forms.
-
->caption Handle the OnChange event and use two-way binding
-
-````CSHTML
-@result
-
-from the model: @MySelectedItem
-
-
-
-
-@code {
- string result;
- string MySelectedItem { get; set; } = "second";
-
- void MyOnChangeHandler(object theUserInput)
- {
- // the handler receives an object that you may need to cast to the type of the component
- // if you do not provide a Value, you must provide the Type parameter to the component
- result = string.Format("The user selected: {0}", (theUserInput as string));
- }
-
- protected List MyList = new List() { "first", "second", "third" };
-}
-````
-
-@[template](/_contentTemplates/common/general-info.md#event-callback-can-be-async)
-
+The examples in this article use `string` values and simple data sources for brevity. You can use full models, see the [data binding]({%slug components/dropdownlist/databind%}) article for more details.
## ValueChanged
@@ -95,6 +63,39 @@ The example below uses [binding]({%slug components/dropdownlist/databind%}) to p
@[template](/_contentTemplates/common/issues-and-warnings.md#valuechanged-lambda-required)
+## OnChange
+
+The `OnChange` event represents a user action - confirmation of the current value. In inputs, it fires when the user presses `Enter` in the input, or when the input loses focus. In the DropDownList, it fires when the user selects an item as well. See [here]({%slug ddl-kb-onchange-fires-twice%}) for sample logic on executing it only once per value selection.
+
+>tip The `OnChange` event is a custom event and does not interfere with bindings, so you can use it together with models and forms.
+
+>caption Handle the OnChange event and use two-way binding
+
+````CSHTML
+@result
+
+from the model: @MySelectedItem
+
+
+
+
+@code {
+ string result;
+ string MySelectedItem { get; set; } = "second";
+
+ void MyOnChangeHandler(object theUserInput)
+ {
+ // the handler receives an object that you may need to cast to the type of the component
+ // if you do not provide a Value, you must provide the Type parameter to the component
+ result = string.Format("The user selected: {0}", (theUserInput as string));
+ }
+
+ protected List MyList = new List() { "first", "second", "third" };
+}
+````
+
+@[template](/_contentTemplates/common/general-info.md#event-callback-can-be-async)
+
## OnRead
You can use the [`OnRead` event]({%slug common-features-data-binding-onread%}) to provide data to the component according to some custom logic and according to the current user input and/or scroll position (for [virtualization]({%slug dropdownlist-virtualization%})). The event fires when:
diff --git a/components/dropdownlist/overview.md b/components/dropdownlist/overview.md
index 07ada66ec2..562003dd9d 100644
--- a/components/dropdownlist/overview.md
+++ b/components/dropdownlist/overview.md
@@ -69,6 +69,9 @@ The Blazor DropDownList @[template](/_contentTemplates/dropdowns/features.md#gro
@[template](/_contentTemplates/dropdowns/features.md#virtualization) [Read more about the Blazor DropDownList virtualization...]({% slug dropdownlist-virtualization %})
+## Adaptive Rendering
+
+@[template](/_contentTemplates/dropdowns/adaptive-rendering.md#intro)
## Parameters
@@ -78,19 +81,21 @@ The Blazor DropDownList @[template](/_contentTemplates/dropdowns/features.md#gro
| Parameter | Type | Description
| ----------- | ----------- | -----------|
-| `Data` | `IEnumerable` | allows you to provide the data source. Required.
-| `DefaultText` | `string` | simple hint to be displayed when no item is selected yet. In order for it to be shown, the `Value` parameter should be set to a default value depending on the type defined in the `ValueField` parameter. For example, `0` for an `int`, and `null` for an `int?` or `string`. You need to make sure that it does not match the value of an existing item in the data source. See the first example in the [Examples section](#examples) in this article and in the [Input Validation]({%slug common-features/input-validation%}#dropdownlist) article.
-| `Enabled` | `bool` | whether the component is enabled.
-|`Filterable` | `bool` | whether [filtering]({%slug components/dropdownlist/filter%}) is enabled for the end user.
-| `FilterDebounceDelay` | `int` 150 | Time in milliseconds between the last typed symbol and the filter input value update. Applicable to filtering only. Use it to balance between client-side performance and number of database queries.
-| `FilterOperator` | `StringFilterOperator` (`StartsWith`)| the method of [filtering]({%slug components/dropdownlist/filter%}) the items.
-| `Id` | `string` | renders as the `id` attribute on the ` ` element, so you can attach a `` to it.
-| `TItem` | `Type`| the type of the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object.
-| `TValue` | `Type` | the type of the value field from the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object. The type of the values can be: - `number` (such as `int`, `double`, and so on) - `string` - `Guid` - `Enum`
-| `TabIndex` | `int?` | the `tabindex` attribute rendered on the dropdown.
-| `TextField` | `string` (`Text`)| the name of the field from the model that will be shown to the user.
-| `ValueField` | `string` (`Value`) | the name of the field from the model that will be the underlying `value`.
-|`Value` and `bind-Value`| `TValue` | get/set the value of the component, can be used for binding. If you set it to a value allowed by the model class value field, the corresponding item from the data collection will be pre-selected. Use the `bind-Value` syntax for two-way binding, for example, to a variable of your own.
+| `AdaptiveMode` | `AdaptiveMode` (`None`) | The [adaptive mode]({%slug adaptive-rendering%}) of the component. |
+| `Data` | `IEnumerable` | allows you to provide the data source. Required. |
+| `DefaultText` | `string` | simple hint to be displayed when no item is selected yet. In order for it to be shown, the `Value` parameter should be set to a default value depending on the type defined in the `ValueField` parameter. For example, `0` for an `int`, and `null` for an `int?` or `string`. You need to make sure that it does not match the value of an existing item in the data source. See the first example in the [Examples section](#examples) in this article and in the [Input Validation]({%slug common-features/input-validation%}#dropdownlist) article. |
+| `Enabled` | `bool` | whether the component is enabled. |
+|`Filterable` | `bool` | whether [filtering]({%slug components/dropdownlist/filter%}) is enabled for the end user. |
+| `FilterDebounceDelay` | `int` 150 | Time in milliseconds between the last typed symbol and the filter input value update. Applicable to filtering only. Use it to balance between client-side performance and number of database queries. |
+| `FilterOperator` | `StringFilterOperator` (`StartsWith`)| the method of [filtering]({%slug components/dropdownlist/filter%}) the items. |
+| `Id` | `string` | renders as the `id` attribute on the ` ` element, so you can attach a `` to it. |
+| `TItem` | `Type`| the type of the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object. |
+| `TValue` | `Type` | the type of the value field from the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object. The type of the values can be: - `number` (such as `int`, `double`, and so on) - `string` - `Guid` - `Enum` |
+| `Title` | `string` | The title text rendered in the header of the popup(action sheet). Applicable only when [`AdaptiveMode` is set to `Auto`]({%slug adaptive-rendering%}). |
+| `TabIndex` | `int?` | the `tabindex` attribute rendered on the dropdown. |
+| `TextField` | `string` (`Text`)| the name of the field from the model that will be shown to the user. |
+| `ValueField` | `string` (`Value`) | the name of the field from the model that will be the underlying `value`. |
+|`Value` and `bind-Value`| `TValue` | get/set the value of the component, can be used for binding. If you set it to a value allowed by the model class value field, the corresponding item from the data collection will be pre-selected. Use the `bind-Value` syntax for two-way binding, for example, to a variable of your own. |
### Styling and Appearance
diff --git a/components/multicolumncombobox/custom-value.md b/components/multicolumncombobox/custom-value.md
index 03ae57a6b9..10f9b2dfb8 100644
--- a/components/multicolumncombobox/custom-value.md
+++ b/components/multicolumncombobox/custom-value.md
@@ -109,6 +109,9 @@ Selected value: @selectedValue
}
````
+## Limitations
+
+* `AllowCustom` is not compatible with [Adaptive rendering]({%slug adaptive-rendering%}).
## See Also
diff --git a/components/multicolumncombobox/overview.md b/components/multicolumncombobox/overview.md
index c0f073afb4..115a237679 100644
--- a/components/multicolumncombobox/overview.md
+++ b/components/multicolumncombobox/overview.md
@@ -102,6 +102,9 @@ The MultiColumnComboBox @[template](/_contentTemplates/dropdowns/features.md#gro
@[template](/_contentTemplates/dropdowns/features.md#virtualization) [Read more about the Blazor MultiColumnComboBox virtualization...]({% slug multicolumncombobox-virtualization %})
+## Adaptive Rendering
+
+@[template](/_contentTemplates/dropdowns/adaptive-rendering.md#intro)
## MultiColumnComboBox Parameters
@@ -111,6 +114,7 @@ The MultiColumnComboBox @[template](/_contentTemplates/dropdowns/features.md#gro
| Parameter | Type and Default Value | Description
| ----------- | ----------- | -----------|
+| `AdaptiveMode` | `AdaptiveMode` (`None`) | The [adaptive mode]({%slug adaptive-rendering%}) of the component. |
| `AllowCustom` | `bool` | Determines if the user can enter [custom values]({%slug multicolumncombobox-custom-value%}). If enabled, the `ValueField` must be a `string`. |
| `ClearButton` | `bool` | Displays a clear button inside the input. When it is clicked, the `Value` will change to `default(TValue)`, so there must be no item in the `Data` that has such a `Value`. For example, if `TValue` is `int`, there should be no data item with `0` in its `ValueField`, otherwise selection issues may occur. |
| `Data` | `IEnumerable` | The component data. |
@@ -122,6 +126,7 @@ The MultiColumnComboBox @[template](/_contentTemplates/dropdowns/features.md#gro
| `Placeholder` | `string` | The hint text the user sees when no item is selected. The placeholder will shown when the `Value` is set to the default value of the `ValueField` type. For example, `0` for `int`, and `null` for `int?` or `string`. |
| `TItem` | `Type` | The type of the model. Required if you can't provide `Data` or `Value`. Determines the type of the reference object. |
| `TValue` | `Type` | The type of the `ValueField` from the model. Required if you can't provide `Data` or `Value`. Determines the type of the reference object. The type of the values can be: - `number` (`int`, `double`, etc.) - `string` - `Guid` - `Enum` |
+| `Title` | `string` | The title text rendered in the header of the popup(action sheet). Applicable only when [`AdaptiveMode` is set to `Auto`]({%slug adaptive-rendering%}). |
| `TextField` | `string` (`Text`) | The name of the model property that will be shown to the user. |
| `ValueField` | `string` (`Value`) | The name of the model property that will be the underlying component `Value`. |
| `Value` | `TValue` | The value of the component. Use the `@bind-Value` syntax for two-way binding. |
diff --git a/components/multiselect/events.md b/components/multiselect/events.md
index f2e443fe60..0f41ad264e 100644
--- a/components/multiselect/events.md
+++ b/components/multiselect/events.md
@@ -24,6 +24,8 @@ This article explains the events available in the Telerik MultiSelect for Blazor
The `ValueChanged` event fires when the user selection changes (the user adds or removes items). The type of the argument in the lambda expression must match the `Value` type of the component.
+@[template](/_contentTemplates/dropdowns/adaptive-rendering.md#value-changed)
+
>caption Handle MultiSelect ValueChanged
````CSHTML
diff --git a/components/multiselect/overview.md b/components/multiselect/overview.md
index 4d0ea06c17..cd6d827538 100644
--- a/components/multiselect/overview.md
+++ b/components/multiselect/overview.md
@@ -83,6 +83,10 @@ The Blazor MultiSelect @[template](/_contentTemplates/dropdowns/features.md#grou
@[template](/_contentTemplates/dropdowns/features.md#virtualization) [Read more about the Blazor MultiSelect virtualization...]({% slug multiselect-virtualization %})
+## Adaptive Rendering
+
+@[template](/_contentTemplates/dropdowns/adaptive-rendering.md#intro)
+
## Parameters
The Blazor MultiSelect provides various parameters that allow you to configure the component:
@@ -91,10 +95,11 @@ The Blazor MultiSelect provides various parameters that allow you to configure t
| Parameter | Type | Description |
| ----------- | ----------- | ------ |
+| `AdaptiveMode` | `AdaptiveMode` (`None`) | The [adaptive mode]({%slug adaptive-rendering%}) of the component. |
| `AutoClose` | `bool` (`true`) | Defines whether the dropdown list containing the items for the MultiSelect will automatically close after each user selection. |
| `ClearButton` | `bool` | Whether the user will have the option to clear the selected items with a button on the input. When it is clicked, the `Value` will be updated to an empty list. |
| `Data` | `IEnumerable` | Allows you to provide the data source. Required. |
-| `DebounceDelay` | `int` 150 | Time in milliseconds between the last typed symbol and the internal `oninput` event firing. Applies when the user types and filters. Use it to balance between client-side performance and number of database queries.|
+| `DebounceDelay` | `int` 150 | Time in milliseconds between the last typed symbol and the internal `oninput` event firing. Applies when the user types and filters. Use it to balance between client-side performance and number of database queries. |
| `Enabled` | `bool` | Whether the component is enabled. |
| `Filterable` | `bool` | Whether [filtering]({%slug multiselect-filter%}) is enabled for the end user (suggestions will get narrowed down as they type). |
| `FilterOperator` | `StringFilterOperator` (`StartsWith`) | The string operation that will be used for [filtering]({%slug multiselect-filter%}). |
@@ -103,7 +108,8 @@ The Blazor MultiSelect provides various parameters that allow you to configure t
| `Placeholder` | `string` | The text the user sees as a hint when there is no selection. |
| `TextField` | `string` (`Text`)| The field in the model from which the text of the items is taken. |
| `TItem` | `Type` | The type of the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object. |
-| `TValue` | `Type` | The type of the value field in the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object. The type of the values can be: - `number` (such as `int`, `double`, and so on) - `string` - `Guid` - `Enum`|
+| `TValue` | `Type` | The type of the value field in the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object. The type of the values can be: - `number` (such as `int`, `double`, and so on) - `string` - `Guid` - `Enum` |
+| `Title` | `string` | The title text rendered in the header of the popup(action sheet). Applicable only when [`AdaptiveMode` is set to `Auto`]({%slug adaptive-rendering%}). |
| `Value` and `bind-Value` | `List` | Get/set the value of the component, can be used for binding. Use the `@bind-Value` syntax for two-way binding, for example, to a variable of your own. The `Value` must be a `List`. |
| `ValueField` | `string` (`Value`)| The name of the field from the model that will be used as values in the selection. |
| `TabIndex` | `int?` | Mps to the `tabindex` attribute of the HTML element. You can use it to customize the order in which the inputs in your form focus with the `Tab` key. |
diff --git a/components/timepicker/events.md b/components/timepicker/events.md
index 6f6e8773bf..676c9fb701 100644
--- a/components/timepicker/events.md
+++ b/components/timepicker/events.md
@@ -12,43 +12,39 @@ position: 20
This article explains the events available in the Telerik TimePicker for Blazor:
-* [OnChange](#onchange)
* [ValueChanged](#valuechanged)
+* [OnChange](#onchange)
* [OnOpen](#onopen)
* [OnClose](#onclose)
* [OnBlur](#onblur)
-## OnChange
-
-The `OnChange` event represents a user action - confirmation of the current value. It fires when the user presses `Enter` in the input, or when the input loses focus.
+## ValueChanged
-The time picker is a generic component, so you must provide either a `Value`, or a type to the `T` parameter of the component.
+The `ValueChanged` event fires upon every change (for example, keystroke) in the input, and upon clicking the `Set` or `Now` buttons in the dropdown.
->caption Handle OnChange
+>caption Handle ValueChanged
````CSHTML
@result
-
+
@code {
string result;
- private void MyOnChangeHandler(object theUserInput)
+ private void MyValueChangeHandler(DateTime theUserInput)
{
- // the handler receives an object that you may need to cast to the type of the component
- // if you do not provide a Value, you must provide the Type parameter to the component
- result = string.Format("The user entered: {0:HH:mm:ss}", (DateTime)theUserInput);
+ result = string.Format("The user entered: {0}", theUserInput);
}
}
````
@[template](/_contentTemplates/common/general-info.md#event-callback-can-be-async)
->tip The `OnChange` event is a custom event and does not interfere with bindings, so you can use it together with models and forms.
+@[template](/_contentTemplates/common/issues-and-warnings.md#valuechanged-lambda-required)
->caption Handle OnChange and use two-way binding
+>caption Handle ValueChanged and provide initial value
````CSHTML
@result
@@ -56,50 +52,54 @@ The time picker is a generic component, so you must provide either a `Value`, or
model value: @thePickerValue
-
+
@code {
string result;
- DateTime? thePickerValue { get; set; } = DateTime.Now;
+ DateTime thePickerValue { get; set; } = DateTime.Now;
- private void MyOnChangeHandler(object theUserInput)
+ private void MyValueChangeHandler(DateTime theUserInput)
{
- // the handler receives an object that you may need to cast to the type of the component
- // if you do not provide a Value, you must provide the Type parameter to the component
- result = string.Format("The user entered: {0}", (theUserInput as DateTime?).Value);
+ result = $"The user entered: {theUserInput}";
+
+ //you have to update the model manually because handling the ValueChanged event does not let you use @bind-Value
+ thePickerValue = theUserInput;
}
}
````
+## OnChange
-## ValueChanged
+The `OnChange` event represents a user action - confirmation of the current value. It fires when the user presses `Enter` in the input, or when the input loses focus.
-The `ValueChanged` event fires upon every change (for example, keystroke) in the input, and upon clicking the `Set` or `Now` buttons in the dropdown.
+The time picker is a generic component, so you must provide either a `Value`, or a type to the `T` parameter of the component.
->caption Handle ValueChanged
+>caption Handle OnChange
````CSHTML
@result
-
+
@code {
string result;
- private void MyValueChangeHandler(DateTime theUserInput)
+ private void MyOnChangeHandler(object theUserInput)
{
- result = string.Format("The user entered: {0}", theUserInput);
+ // the handler receives an object that you may need to cast to the type of the component
+ // if you do not provide a Value, you must provide the Type parameter to the component
+ result = string.Format("The user entered: {0:HH:mm:ss}", (DateTime)theUserInput);
}
}
````
@[template](/_contentTemplates/common/general-info.md#event-callback-can-be-async)
-@[template](/_contentTemplates/common/issues-and-warnings.md#valuechanged-lambda-required)
+>tip The `OnChange` event is a custom event and does not interfere with bindings, so you can use it together with models and forms.
->caption Handle ValueChanged and provide initial value
+>caption Handle OnChange and use two-way binding
````CSHTML
@result
@@ -107,19 +107,18 @@ The `ValueChanged` event fires upon every change (for example, keystroke) in the
model value: @thePickerValue
-
+
@code {
string result;
- DateTime thePickerValue { get; set; } = DateTime.Now;
+ DateTime? thePickerValue { get; set; } = DateTime.Now;
- private void MyValueChangeHandler(DateTime theUserInput)
+ private void MyOnChangeHandler(object theUserInput)
{
- result = $"The user entered: {theUserInput}";
-
- //you have to update the model manually because handling the ValueChanged event does not let you use @bind-Value
- thePickerValue = theUserInput;
+ // the handler receives an object that you may need to cast to the type of the component
+ // if you do not provide a Value, you must provide the Type parameter to the component
+ result = string.Format("The user entered: {0}", (theUserInput as DateTime?).Value);
}
}
````
diff --git a/components/timepicker/overview.md b/components/timepicker/overview.md
index 64dcd5d941..3553a56f55 100644
--- a/components/timepicker/overview.md
+++ b/components/timepicker/overview.md
@@ -61,14 +61,19 @@ The time format specifiers in the `Format` control the tumblers available in the
The `Min` and `Max` properties require a `DateTime` object, but will only use the time portion from it. Thus, the date itself is not important. The hours, minutes, seconds and AM/PM portions control the range of the tumblers in the time picker dropdown. They do not impose validation/limitations on the input editing.
+## Adaptive Rendering
+
+@[template](/_contentTemplates/dropdowns/adaptive-rendering.md#intro)
+
## Time Picker Parameters
-The Blazor Time Picker component provides various parameters that allow you to configure the component:
+The Blazor Time Picker component provides various parameters that allow you to configure the component. Also check the [TimePicker's public API](/blazor-ui/api/Telerik.Blazor.Components.TelerikTimePicker-1).
@[template](/_contentTemplates/common/parameters-table-styles.md#table-layout)
| Attribute | Type and Default Value | Description |
-|----------|----------|----------|
+|---|---|---|
+| `AdaptiveMode` | `AdaptiveMode` (`None`) | The [adaptive mode]({%slug adaptive-rendering%}) of the component. |
| `AutoComplete` | `string` (`"off"`) | The `autocomplete` HTML attribute of the `input`. |
| `DebounceDelay` | `int` (`150`) | Time in milliseconds between the last typed symbol and the value update. Use it to balance between client-side performance and number of database queries. |
| `Enabled` | `bool` | Specifies whether typing in the input and opening the dropdown are allowed. |