The user wants to enter several values separated by a comma, but with AutoComplete, when the user selects a value, it always clears the previous values.
Is it possible to have an Append behavior, where the value gets appended rather than the current Overwrite behavior?
What I want to do is actually almost the same as the Tags textbox I used now to create this post. Thanks!
Edit: Never mind, I think Multiselect is what I should use. https://demos.telerik.com/blazor-ui/multiselect/overview
Is it possible to catch all errors in Blazor Server like in MVC 5 in global.asax on Application_Error and send an email to application administrator?
thank you,
MAtej
Hello, per the documentation here:
https://docs.telerik.com/blazor-ui/components/grid/columns/command
Yet ChildContent doesn't appear to exist? It doesn't come up in IntelliSense. When I try using it anyhow, the text appears in red, or worse, ReSharper thinks it's a constant from some library that hasn't been imported:
Your examples don't show how to use ChildContent, so I'm making educated guesses.
I can get away from the "red text" by pointing it to a string:
<GridCommandButton Command="Test" ChildContent="@test"></GridCommandButton>
and
@code { private string test = "Test Content"; }
However I get compiler errors, so I don't think that's correct either.
It looks like the compiler is expected ChildContent to be a RenderFragment:
Error CS0030 Cannot convert type 'string' to 'Microsoft.AspNetCore.Components.RenderFragment'
I can use the alternate method of putting the text between the tags:
<GridCommandButton Command="Test">Test</GridCommandButton>
I initially tried the ChildContent method because I can getting a warning I didn't initially understand when I tried using the text between the tags. I now understand that was a ReSharper warning of no significance.
But I thought I'd point out docs for ChildContent appear to be incomplete?
Thanks.
My scenario is: When the user starts making changes, I am showing a warning notification to the user to not forget to hit save. After the user presses save, I want to make that notification disappear if it is still visible and the user haven't closed it themselves yet.
Please let me know if its possible to do so.
Thanks,
Alex
I have a TreeView with checkboxes.
How can I hide a checkbox for a parent node?
also, is there CheckedChanged event ?
In the main MS Blazor docs there is an article Avoid rerendering after handling events without state changes
They give an example of using a button click - eg
<button @onclick="EventUtil.AsNonRenderingEventHandler<MouseEventArgs>(HandleClick3)">
Select me (Avoids Rerender and uses <code>MouseEventArgs</code>)
</button>
private void HandleClick3(MouseEventArgs args)
{
dt = DateTime.Now;
Logger.LogInformation(
"This event handler doesn't trigger a rerender. " +
"Mouse coordinates: {ScreenX}:{ScreenY}",
args.ScreenX, args.ScreenY);
}
How can this be applied to say the TelerikNumericTextBox ValueChanged event?
For example, the following gives errors
<TelerikNumericTextBox T="int" Value="@NumericTextBoxValue"
ValueChanged="EventUtil.AsNonRenderingEventHandler<int>(NumericTextBoxChangeHandler)"
Min="1" Max="120" Width="120px">
</TelerikNumericTextBox>
private void NumericTextBoxChangeHandler(int newValue)
{
Console.WriteLine($"newValue == {newValue}");
NumericTextBoxValue = newValue;
}
Is this possible in Telerik Blazor? Or is there another inbuilt mechanism to control which events automatically invokes StateHasChanged?
Hello, I'm programmatically setting the selected list (/from/ the available selection) on a MultiSelect.
It's bound to a List<string> that is part of a class: data.Value.
The MultiSelect is part of a "child" component that I use on more than one page.
On initial load, the List<string> that it is bound to is freshly instantiated in the class: public List<string> Value {get; set; } = new();
The very first time the code populates the list, the UI properly reflects the associated names (using key/value pairs from a dictionary).
After that, the UI doesn't change with further updates to the list.
My original code had Value.Clear() and then Value.Add(<new string values>) as required.
On a hunch, I changed it to re-instantiate the List instead of Value.Clear(), and now the UI refreshes as I expect it to.
I see the example https://docs.telerik.com/blazor-ui/components/multiselect/refresh-data first List.Clear()'s the List, then re-instantiates it, which I find odd. Why .Clear() if you're going to re-instantiate it?
void ClearSelected()
{
TheValues.Clear();
TheValues = new List<int>(TheValues);
}
1) Is it supposed to work with .Clear() and then add new items after the first time?
2) Why does it work the first time with adding new items?
3) Am I doing something incorrectly?
4) Why does the example .Clear() and then re-instantiate it?
Thanks!
Hi all,
I am using TelerikTreeList with custom filter menu. In the filter menu template I am using TelerikRadioGroup with Vertical layout but it is always display as Horizontal. I try to add css to a div outside with display:inline but it still does not work. It is only display as Vertical when I inspect element and then remove class k-filter-menu.
The problem is I have many items in the radioGroup so display Horizontal does not look good. Is there any workaround solution for this?
The code is look like this (I already removed some other columns)
<TelerikTreeList Data="@Tasks"
IdField="Id"
Class="taskTreeView"
ParentIdField="ParentId"
Resizable="true"
EditMode="TreeListEditMode.Inline"
FilterMode="@TreeListFilterMode.FilterMenu"
OnRowRender="@OnRowRenderHandler">
<TreeListToolBar>
<TreeListCommandButton Command="Add" Icon="add">New Task</TreeListCommandButton>
</TreeListToolBar>
<TreeListColumns>
<TreeListColumn Field=@nameof(TaskItem.DueDate) Title="Due Date" Width="100px" FieldType="@typeof(string)">
<Template>
@{
var item = context as TaskItem;
<div>
@(item.DueDate.ToString("MMM d"))
</div>
}
</Template>
<FilterMenuTemplate>
@{
HireDateFilterMenuTemplateContext = context;
ExtendHireDateFilterDescriptor();
}
<div class="filter-radio">
<TelerikRadioGroup Data="@DateOptions"
Value="@SelectedDueDateRadioSelector"
ValueChanged="@((int value) =>
OnChangeHandler(value) )"
Layout="RadioGroupLayout.Vertical"
ValueField="@nameof(RadioOptionsModel.IdField)"
TextField="@nameof(RadioOptionsModel.DisplayField)">
</TelerikRadioGroup>
</div>
</FilterMenuTemplate>
</TreeListColumn>
</TelerikTreeList>
The UI looks like this