If I have a field backed by an enum, the Grid will display the name of the enum in the Grid cell, but the Grid search toolbar will not search its string name, despite the string name being what is displayed to the user (it won't search the integer value either, if anyone was wondering) :/ It will work fine for all the other fields that are not an enum.
REPL example:
https://blazorrepl.telerik.com/ccERPPET55C7yHfg40
Hello,
I ran into a small quirk when using the Blazor TabStrip component. If I have a list of models for the tabs to be initialized from and I don't set PersistTabContent to be true, only the first tab will call a components OnInitializedAsync method. If I do set PersistTabContent to true then the components get their OnInitializedAsync called, but only once as is to be expected. On the other hand, if I have "hardcoded" the TabStripTabs, then the OnInitializedAsync is called. Is this a bug or am I doing something weirdly?
A small demo can be seen at https://blazorrepl.telerik.com/cmadPIvY25vWwvTi23 where if you open the browser devtools and goto the console tab, you can see that when you change the active tab on the upper Strip, OnInitializedAsync is not called if PersistTabContent is false.
Regards, Rami
Hello!
I am wondering if the new FormEditorType approach for automatic form generation could be extended in order to support more input types like ColorPicker for example?
Thanks.
We have data coming from an API endpoint that handles paging, filtering, and sorting, so we are using manual data source operations through OnRead.
All of the documentation examples show this pattern
protected async Task OnRead(GridReadEventArgs args)
{
var result = await FetchData(args.Request.Page, args.Request.PageSize);
args.Data = result.Data;
args.Total = result.TotalCount;
}
This is not a usable pattern for us. We dispatch api calls using a Redux/Flux pattern (Fluxor library). Here is a trimmed down version of what we are doing
<TelerikGrid @* Data=CaseState.Value.Cases // since 3.x does nothing if using OnRead *@
@* TotalCount=CaseState.Value.TotalCount // not available since 3.x*@
PageSize=100
Pageable=true
Sortable=true
Resizable=true
Reorderable=true
OnRead=@OnRead
Width="100%"
@ref=_grid>
<GridColumns>
...
</GridColumns>
</TelerikGrid>
Code behind:
...
[Inject]
private IState<CaseState> CaseState { get; set; } = default!;
...
protected void OnRead(GridReadEventArgs args)
{
var pageRequest = CreateRequestFromArgs(args);
// This is a void method and returns immediately
Dispatcher.Dispatch(new GetCaseListAction() { SearchRequest = pageRequest });
}
When the api call returns (handled elsewhere) another action is dispatched to the store which updates the CaseState (which in turn triggers StateHasChanged() for the component).
Prior to 3.x we used to be able to pass the collection to the Data parameter AND make use of OnRead. This is no longer possible and results in a NullReferenceException because the Data is not being set on the GridReadEventArgs.
I looked at using GridState as it contains some of paging, filtering, and sorting info, but not the Total Count or the actual data. Is there a way to pass Data, TotalCount and the rest of the state in one place either declaratively through component parameters or programmatically via a component ref?
Take a look at the picture. The clear content cross is at the left
I am trying to add something like
<a href="#" onclick="doSomething()">do something</a>
Hello,
I am currently working on grids with a server side pager system.
https://docs.telerik.com/blazor-ui/components/grid/manual-operations
Recently I wanted to add multiple line selection but with the server side pager I can't get a correct behavior.
My SelectedItems variable which contains the list of selected items keeps the selected items despite the change of page but on the other hand when I come back to a page with selected items, the checkboxes are not checked.
In addition I can reselect them which adds them several times in my list.
Do you have an example of a server-side paging system with multiple line selection?