I have this javascript exception when use MultiColumnComboBox (but sometime also with ComboBox / DropDown).
If i continue debugging it go without issue, but it break always on component load.
I'm trying to adjust the existing size definitions as outlined here in your docs:
https://www.telerik.com/blazor-ui/documentation/components/dropdownlist/appearance
I'd like to adjust the definition for sm, md, lg as they don't work well with TailwindCSS settings. For example lg is just a tad too large and md is a tad too small
This is lg:
This md:
I want to match the border size to our standard input text (aka Postal Code example above). I can't seem to find where sm, lg, md are defined? And, is there a relative "simple" way to modify without going down a "custom" theme path?
Rob.
<div class="gsi-background-color-light" style="height: 41px; display:flex;justify-content:space-between;">
<div class="align-self-center gsi-font-kendo gsi-margin-0">
Patient Filters
</div>
<TelerikButton Id="filterChevronButton"
FillMode="Clear"
Class="gsi-border-width-0 gsi-border-color-white gsi-padding-8"
Icon="@( FilterVisible? Telerik.SvgIcons.SvgIcon.Filter : Telerik.SvgIcons.SvgIcon.Filter)"
OnClick="@(() => ExpandCollapse())" />
</div>
<TelerikAnimationContainer @ref="@AnimContainer"
Class="gsi-background-color-light gsi-margin-5 k-rounded-0"
Width="100%"
Height="100vm">
<TelerikStackLayout Spacing="1px" Class="gsi-margin-5">
<TelerikCard Width="25vh">
<CardBody>
<div class="form-group-short">
<label class="col-form-label" for="firstName">First Name</label><br />
<TelerikTextBox @bind-Value="@FirstNameFilter"
Name="firstName"
Placeholder="-No Filter-"
OnChange="@(x => OnFilterChanged(nameof(FirstNameFilter), x))">
</TelerikTextBox>
</div>
private async Task OnFilterChanged(string propertyName, object newValue) { await GetPatients(); ExpandCollapse(false); }
private async Task OnFilterChanged(string propertyName, object newValue) { object existingValue = this.GetPropertyValue(propertyName); if (newValue != existingValue) { this.SetPropertyValue(propertyName, newValue); await GetPatients(); ExpandCollapse(false); } }
public async void ExpandCollapse(bool? filterVisible = null) { if (filterVisible.HasValue) { await AnimContainer.ToggleAsync(); FilterVisible = filterVisible.Value; } else { await AnimContainer.ToggleAsync(); FilterVisible = !FilterVisible; } }
The user doesn't have to select anything in my drop down. So, if they select something and change their mind and want to clear it... how do I do it?
<TelerikDropDownList @bind-Value="@SessionOptionIndex1"
Data="@SessionOption1Items"
TextField="Name" ValueField="Id" />
A DropDownList receives a List of Items and then displays the field I select via Reflection. In the example below that would be the "Text" field. How would I create a localized text in an easy way. I already inject the IStringLocalizer into this component but I cannot pass a method call to the dropdownlist as far as I know. Is there a way to tell Telerik globally to use my Localizer to translate all strings that would be rendered or sth like that? I have several ideas how I could add Localizations but they all seem rather complicated and I would like to know the intended way.
<TelerikDropDownList Data="@Data"
@bind-Value="@SelectedValue"
TextField="@nameof(MyType.Text)"/>
Hello, i want use the treeview, i have many elements. so it stretch if i expand it over the screen, and this is not fine :)
so i want the treeview in the dropdown list. but it doestn work. it looks horrible. Have someone a idea or a soution. thank you.
this is my code. and i need a treeview. because i have expand items.
<TelerikDropDownList Data="@FlatData" @bind-Value="SelectedItemText" >EDIT: Title should say *Can't* enable/disable DropDownList rather than *Can*
I have a Dialog component with a DropDownList and a MultiSelect. When no items are selected in the MultiSelect, I want the DropDownList to be disabled. I've set it up like so:
<TelerikDropDownList Data="@Data" @bind-Value="@SelectedValue" Enabled="@IsEnabled"/>
<TelerikMultiSelect Data="@SelectData"
TextField="Text"
ValueField="TheValue"
OnChange="@SelectChange"
@bind-Value="@SelectValue"/>
@code {
public class MyData
{
public string Text { get; set; }
public string TheValue { get; set; }
}
private string @SelectedValue { get; set; } = "One";
private List<string> Data { get; set; } =
[
"One",
"Two",
"Three"
];
private List<MyData> SelectData { get; set; } =
[
new MyData { Text = "One", TheValue = "1" },
new MyData { Text = "Two", TheValue = "2" },
new MyData { Text = "Three", TheValue = "3" }
];
private List<string> SelectValue { get; set; } = [];
private bool IsEnabled = false;
private void SelectChange()
{
IsEnabled = SelectValue.Count > 0;
}
}
When I put the DropDownList and MultiSelect directly into a Dialog, this doesn't work. Specifically, when I add items to the MultiSelect, the DropDownList doesn't get enabled. However, when I move this exact same code into a separate component and then embed THAT component into the Dialog, then it does. Any ideas why that would be?
I have a reproduction of the issue here: https://github.com/kbaley/TelerikBlazor/blob/main/TelerikBlazor/TelerikBlazor.Client/Pages/Home.razor
EDIT: I've tried calling StateHasChanged in the SelectChange handler but it doesn't change the behaviour.
Hi there.
I have a list of a class which contains 2 string properties, "MyValueField" and "MyTextField".
If one of the items in the list has the MyValueField property set to an empty string (in the example below it's the first item), selecting that item in the TelerikDropDownList will assign null to the binded value. Instead, an empty string should be assigned to the binded value variable.
It is worth noting that "externally" assigning the binded value variable to an empty string (either on initialization or through a button) will successfully work and the TelerikDropDownList component will display the selected item.
The following gif showcases the binded value variable becoming null when the item with MyValueField set to an empty string is selected through the TelerikDropDownList: https://i.gyazo.com/3d75359334d900a74334ae6de2493576.mp4
The following gif showcases the binded value variable becoming an empty string when pressing a button that sets it to one, and gets set to null when the first item in the TelerikDropDownList is selected: https://i.gyazo.com/12ee88a8e161f8c3b5a023d8fbc44a28.mp4
Here is the REPL link: https://blazorrepl.telerik.com/GfYbuCFt318IzZzv41
This also affects the ComboBox component: https://blazorrepl.telerik.com/czOPYjFf04sX7cIW36