I'm using the "Predefined Dialogs".
... await Dialogs.ConfirmAsync("Are you sure?", Title);
How can I add icon to the dialog title and dialog buttons
How do you identify which grid raised the OnRead event to be able to do custom sorting on a grid when there are more than one grid?
For example, say I have multiple grids created in a loop
Razor:
@for (int i = 0; i < _someData.Count(); i++)
{
int gridIndex = i;
<TelerikGrid Data=@_someData.ElementAt(i)
OnStateChanged="@((GridStateEventArgs<SomeData> args) => OnGridStateChangedHandler(args))"
OnRead="@OnGridRead"
@ref="@GridRefList[gridIndex]"
....
}
Code:
@code {
TelerikGrid<SomeData>[] GridRefList { get; set; }
private async Task OnGridRead(GridReadEventArgs args)
{
// Which grid raised this event?
}
}
How can I determine which grid fired the event so that I can load it with the correct data? All of the examples and links seem to only work with a single grid. Eg
https://www.telerik.com/forums/custom-sorting-and-filtering
https://docs.telerik.com/blazor-ui/components/grid/manual-operations
Hey, i am following the example listed here Blazor FileSelect - Events | Telerik UI for Blazor to use the FileSelect in my project to allow users to upload files in a blazor server all.
I'm using the code below to save the files to a network location.
private async Task UploadFile(FileSelectFileInfo file) { var path = Path.Combine(HostingEnvironment?.WebRootPath, file.Name); await using FileStream fs = new FileStream(path, FileMode.Create); await file.Stream.CopyToAsync(fs); }
file.Stream.CopyTo(fs);
Hi,
How to change the treenode Text, font size and color at runtime in Blazor? I am trying following code. I changed text in both data structures i.e. FlatData and ExpandedItems. Text is being changed in data structure but change is not reflecting on UI.
<TelerikTreeView OnItemClick="@OnItemClickHandler"
Data="@FlatData" @bind-ExpandedItems="@ExpandedItems">
<TreeViewBindings>
<TreeViewBinding ParentIdField="ParentIdValue"></TreeViewBinding>
</TreeViewBindings>
</TelerikTreeView>
@code{
public ObservableCollection<TreeItem> FlatData { get; set; }
public IEnumerable<object> ExpandedItems { get; set; }
protected override async Task OnInitializedAsync()
{
LoadFlatData();
timer = new System.Threading.Timer(async _ => // async void
{
FlatData[0].Text = "Net";
ExpandedItems = FlatData;
// we need StateHasChanged() because this is an async void handler
// we need to Invoke it because we could be on the wrong Thread
await InvokeAsync(StateHasChanged);
}, null, 0, 5000);
}
}
Hi,
I have build a custom dialog for editting appointments. But if I double click a recurring appointment, the default edit recurring appointment dialog appears.
In my OnEdit method, I have:
args.IsCancelled = true
But at the moment, the edit recurring appointment dialog appears, my custom OnEdit method is not yet invoked.
How can I use a custom dialog for the selection of "edit series" and "edit current occurence"?
What is the best/easiest way to limit the number of characters and a user can enter into a TextArea? There is no MaxLength property that I have seen.
Hi,
I read all the documentation and downloaded the demo project, but I cannot get the ITelerikStringLocalizer to work in my blazor wasm project.
I included the community resource files and made a custom implementation of ITelerikStringLocalizer which I added to the dependency container as singleton in the blazor client project.
If I set a breakpoint in this custom implementation I never get a hit. The culture is set at nl-BE, so for some default labels on the Telerik components I would expect the Dutch translation. When checking the teletik datetimepicker I would expect a translation for the marked buttons, I see they are available in the nl-BE resource file.
I assume the default english resource file is used, but what could be the reason for this?
Is there a way to use the stepper in a view only mode? I am using it to show the current status in a larger process, so the user shouldn't be able to click to change the value.
Thanks in advance