Breaking Changes in 3.0.0
Common Changes
OnRead
The OnRead
handlers of all components now expect you to set the data to an event argument instead of the component Data
attribute. This new data binding mechanism will no longer depend on the component life cycle and will allow new features, which could not be supported in the past (such as Excel export of all pages with OnRead
).
Note the following changes when using manual data operations:
- Set the
TItem
attribute of the component. This will provide information about the model type, instead ofData
. - Set the
TValue
attribute for ComboBox, DropDownList and MultiSelect. - Do not set the
Data
attribute. Instead, setargs.Data
(IEnumerable
) in theOnRead
handler. - There is no need to cast the items returned by
ToDataSourceResult()
when settingargs.Data
. - Do not set
TotalCount
. This attribute is now removed in favor of theargs.Total
event argument (int
) in theOnRead
handler. - Aggregates over all the data are now supported via
args.AggregateResults
(IEnumerable<AggregateResult>
). TheAggregateResults
event argument is exposed only for components that support aggregates. If the Grid is bound toDataTable
, a workaround is still necessary. - If you have cached the
DataSourceRequest
object in order to setData
later, the new approach is to reset the Grid state, so thatOnRead
is called again. - Binding to
ObservableData
viaOnRead
is no longer supported. - UI for Blazor 3.0.1 introduced a
Rebind
method that triggersOnRead
for on-demand data updates. Here is a rebind example for the Grid and a similar one for the ComboBox.
UI for Blazor 2.30 | UI for Blazor 3.0 |
---|---|
|
|
Popup Settings
-
PopupClass
,PopupHeight
andPopupWidth
attributes are removed in favor of a nested popup settings tag. Applies to AutoComplete, ComboBox, DropDownList and MultiSelect. The nested tag name depend on the component name.
UI for Blazor 2.30 | UI for Blazor 3.0 |
---|---|
|
|
Other Common Changes
-
ToODataString
extension method is moved to theTelerik.Blazor.Extensions
namespace. TheTelerik.Blazor.ExtensionMethods
namespace is removed in favor ofTelerik.Blazor.Extensions
. -
Telerik.Blazor.IconName
class (obsolete since version 2.0) is removed. Use the icon names from the Built-in Icons documentation.
Component Changes
Grid
- Changed
GridEditMode
enum default value fromInline
toNone
. Grid editing should be explicitly enabled for theAdd
andEdit
command buttons to work. - Changed the popup edit form orientation to vertical. This is now consistent will the default
TelerikForm
Orientation
and the popup edit forms in all components. UI for Blazor 3.1 will provide popup configuration settings. - Use
IFilterDescriptor
to work with the Grid state, instead ofFilterDescriptorBase
. - Removed method
ExportToExcel()
(MemoryStream
) in favor ofExportToExcelAsync()
(Task<MemoryStream>
). - Removed method
ExportToCsv()
(MemoryStream
) in favor ofExportToCsvAsync()
(Task<MemoryStream>
).
UI for Blazor 2.30 | UI for Blazor 3.0 |
---|---|
|
|
- Removed
ExpandedRows
(ICollection<int>
) in favor ofExpandedItems
(ICollection<TItem>
) in the GridState.ExpandedItems
expects items, instead of item indexes. Also, thePropertyName
argument in theOnStateChanged
event changes from"ExpandedRows"
to"ExpandedItems"
in hierarchy scenarios.
UI for Blazor 2.30 | UI for Blazor 3.0 |
---|---|
|
|
Other Components
-
Button - removed
Primary
parameter in favor ofThemeColor
of typestring
. There is a new static classTelerik.Blazor.ThemeConstants.Button.ThemeColor
with a predefined set of theme colors. To get the old primary Button styling, setThemeColor="@ThemeConstants.Button.ThemeColor.Primary"
.
UI for Blazor 2.30 | UI for Blazor 3.0 |
---|---|
|
|
DateInput – removed
ParsingErrorMessage
(obsolete since version 2.8) in favor ofDateInput_ParsingErrorMessage
localization string.Loader, LoaderContainer - changed
Size
parameter type fromLoaderSize
enum tostring
(example below). The default value ofSize
isThemeConstants.Loader.Size.Medium
. There is a new static classTelerik.Blazor.ThemeConstants.Loader.Size
with a predefined set of size properties.-
Notification, Loader, LoaderContainer - changed
ThemeColor
parameter type fromThemeColors
enum tostring
. The default value ofThemeColor
isThemeConstants.Loader.ThemeColor.Primary
. There is a new static classTelerik.Blazor.ThemeConstants.Loader.ThemeColor
with a predefined set of properties.
UI for Blazor 2.30 | UI for Blazor 3.0 |
---|---|
|
|
-
TextBox, MaskedTextBox, TextArea -
Label
parameter is removed. UI for Blazor 3.1.0 features a standalone FloatingLabel component. For UI for Blazor 3.0.0 and 3.0.1, check the following KB that shows how to add a label.
UI for Blazor 2.30 | UI for Blazor 3.0 |
---|---|
|
|
-
TileLayout - introduced optional
Id
attribute for theTileLayoutItem
. TheOnResize
event handler will receive argument of typeTileLayoutResizeEventArgs
. TheOnReorder
event handler will receive argument of typeTileLayoutReorderEventArgs
. Both event arguments will point to the tile item (args.Id
) and define if the component should re-render after the event (args.ShouldRender
).
UI for Blazor 2.30 | UI for Blazor 3.0 |
---|---|
|
|
-
TreeList - changed
TreeListEditMode
enum default value fromInline
toNone
. TreeList editing should be explicitly enabled for theAdd
andEdit
command buttons to work. TreeList - changed the popup edit form orientation to vertical. This is now consistent will the default
TelerikForm
Orientation
and the popup edit forms of all components. UI for Blazor 3.1 will provide popup configuration settings.TreeView - removed
ExpandedField
parameter in favor ofExpandedItems
(IEnumerable<object>
). The expanded state of TreeView items will no longer depend on a model property.ExpandedItems
supports two-way binding.
UI for Blazor 2.30 | UI for Blazor 3.0 |
---|---|
|
|
-
Window - changed
Size
parameter type fromWindowSize
enum tostring
. There is a new static classTelerik.Blazor.ThemeConstants.Window.Size
with a predefined set of size properties. To maintain the old behavior, set the WindowWidth
to300px
,800px
or1200px
.
Parameter Names
We are making our API naming more consistent.
-
Drawer -
Content
RenderFragment is renamed toDrawerContent
-
Drawer -
IsSeparatorField
parameter (obsolete since version 2.27) is removed in favor ofSeparatorField
-
Editor -
UpdateInterval
parameter is renamed toDebounceDelay
-
Stepper -
IsCanceled
property inStepperStepChangeEventArgs
(obsolete since version 2.26) is removed in favor ofIsCancelled
Rendering and Themes
The HTML rendering and CSS classes have been updated for multiple components, including Buttons, Textbox components, Dropdown components, Date/Time Pickers, Checkbox, Switch. Recreate any custom themes via import or from scratch.
CSS Classes for State
Some CSS classes related to component state were renamed.
UI for Blazor 2.30 | UI for Blazor 3.0 |
---|---|
k-state-disabled |
k-disabled |
k-state-focused |
k-focus |
k-state-invalid |
k-invalid |
k-state-selected |
k-selected |
k-widget Class
The k-widget
CSS class was removed from all components. If you use this class in custom CSS code, replace it with the corresponding component-specific classes.
UI for Blazor 2.30 | UI for Blazor 3.0 |
---|---|
|
|
Component Widths
- Dropdown components – removed the default inline style of
width: 300px
. The new default width is100%
and comes from the theme CSS. Applies to AutoComplete, ComboBox, DropDownList, MultiSelect. - Textbox components - changed the default theme width from
12.4em
to100%
. Applies to DateInput, Date/Time Picker, MaskedTextBox, NumericTextBox, TextArea, TextBox.
Input Rendering
-
Textbox and dropdown components have new consistent HTML rendering. Note the
k-input
CSS class, which is now used for the outer component element, instead of the<input>
.<span class="k-[COMPONENT] k-input"> <!-- k-picker instead of k-input for the DropDownList --> <input class="k-input-inner" /> <!-- SPAN element instead of INPUT for the DropDownList --> <button class="k-input-button [BUTTON CLASSES]"><!-- button here if needed--></button> </span>
REPL Changes
Telerik REPL for Blazor always uses the latest official version of the Telerik.UI.for.Blazor
NuGet package.
Any snippet created before
Telerik.UI.for.Blazor
version 3.0 (January 19, 2022) may need an update due to the above list of changes.