The demos and examples for storing and retrieving GRID state uses the JavaScript localStorage.setItem and localStorage.getItem that work great. As part of .NET 5 there's a Microsoft equivalent for accessing Local Storage using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage. I've found the behavior of these demos and examples will not work by simply replacing the JavaScript with .NET equivalents. My experience is getting Circuit Handler exceptions that make these example not work.
Although not a requirement since there's a JavaScript solution for local storage, I would like to recommend that since you partner closely with .NET team at Microsoft. That your GRID development team test and provide examples with the Microsoft .NET 5 out-of-the-box local storage solution and resolve any incompatibilities for developers not wanting to use 1st party local storage solutions embedded within Microsoft Blazor.
----
ADMIN EDIT
I made a sample test and things seemed to work for me, so I made a public example, you can find it in this pull request until it gets merged. I'm also attaching it to this post, but for anyone seeing this after a time - the public repository linked above is a better place to look for this in case more updates and information have been added since the time of writing this.
---
Hi,
we are having a hard time to come up with a general application layout (menu/navigation).
We found PanelBar, Menu and Drawer... are there any other controls related to menu & navigation?
A more UX oriented documentation (and not only for the technical components individually) would be nice e.g. like they do it here: Overview | Clarity Design System
Kind regards
Steffen
Incremental Search A grid that can be searched incrementally as one types in the search box.
On-demand Sort It should have the ability to do a toggle between ascending and descending sort order when the user taps on a column header.
Pagination It should provide customizable pagination so only one page worth of data is fetched at any given time.
Did I describe the jQuery Datatable functionality? It is because it is so good and having the equivalent of its server-side implementation equivalent in Blazor will be awesome.
Implementation Thoughts The control sends a predefined model to an event bound function as parameter. The model has the information like requested page, column-sort request, letters the user typed into the search box etc. The function fetches data based on the model and the grid updates dynamically.
It would be nice to switch the color schemes used by the telerik Blazor components on-the-fly in an application (i.e. switch from light mode to dark mode). I realize you have a JS approach to this problem, however that requires maintaining multiple stylesheets and custom javascript, which we are trying to avoid in a Blazor project. I like the approach used by MudBlazor where basically all css colors are variables that can be easily switched at runtime without any javascript:
https://mudblazor.com/wasm/customization/theming/overview
In order to be able to easily work on mobile (tablet) and desktop browsers using touch it would be great if tree view supported multi select through a single click to select and click to unselect option without the need to hold down the ctrl key or anything like that
This can be worked around currently implementing a TreeView template and then the OnClick event to allow custom tracking of selected and unselected items but this feels like a common enough requirement for touch support that it would be great to support out of the box with the control
Is it possible to add to the carousel a thumbnail scrollable navigation below the "page/image"? I'm thinking this would be a nice addition, which would allow independent scrolling from that of the current page and also be clickable in the same way that the dots are in order to jump to the selected page.
----------ADMIN EDIT----------
The knowledge base article is now live - "Carousel Thumbnail Scrollable Navigation".
Thanks,
James
Working with UI Blazor version 3.0.0
Setting a sort descriptor in the OnStateInitHandler.
Everything works, but I need to customize the sort. I need "A" and "a" to sort the same. I also need blanks to sort at the bottom. A custom sort method. Can't figure out how to implement a SortCompare, can't find an example.
Here's what I have
SortDescriptors = new List<SortDescriptor>()There doesn't seem to be a way to deselect the selected row either by clicking on a selected row again or by two-way-binding and setting it to an empty list.
This would be pretty handy as currently the only way that makes sense for me is to make no use of selection mode at all.
Hello
I noticed the DateRangePicker "OnChange" fires "on blur".
Confirmed by the docs;
https://docs.telerik.com/blazor-ui/components/daterangepicker/events#onchange
Is it possible to expose OnInput even for a "react style" onchange event?
https://linguinecode.com/post/onblur-vs-onchange-react-text-inputs
I think the StartValueChanged and EndValueChanged events have the same behaviour so unbinding might not be a solution..?
Attached is a use case where it is confusing because the events are not in sync... You'll see the grid data changes (data bound), but OnChange after you click out.
I would like to pass a defined piece of data in when I add a new row in a hierarchical Blazor grid. in the example below, I have a hierarchy of Agency > District > School. When I add a new school within a district, I would like to pass the District ID so that the user does not have to select it or type it in.
I have a district ID column in the schools grid, but (a) it would be better if the user did not see this and (b) when I click "Add school" that field is always passed as empty. Is there any way to pass the
districtSchools.Dist.DISTRICT_ID
variable when I add a row?
<TelerikGrid Data="@Agencies" Sortable="true" Reorderable="true" OnUpdate="@UpdateHandlerAgency">
<DetailTemplate Context="granteeAgency">
@{
var leadAgency = granteeAgency as Agency;
<TelerikGrid Data="leadAgency.Districts" OnUpdate="@UpdateHandlerDistrict" OnRowRender="@OnRowRenderHandlerDistrict">
<GridColumns>
<GridColumn Field="@(nameof(District.Dist.DistrictName))" Editable="false">
<Template>
@((context as District).Dist.DistrictName.ToString())
</Template>
</GridColumn>
<GridColumn Field="@(nameof(District.DistAlloc))">
<Template>
@((context as District).DistAlloc.ToString("C"))
</Template>
</GridColumn>
<GridCommandColumn>
<GridCommandButton Command="Edit" Icon="edit">Edit</GridCommandButton>
<GridCommandButton Command="Save" Icon="save" ShowInEdit="true">Update</GridCommandButton>
<GridCommandButton Command="Cancel" Icon="cancel" ShowInEdit="true">Cancel</GridCommandButton>
</GridCommandColumn>
</GridColumns>
<DetailTemplate Context="districtSchools">
<TelerikGrid Data="districtSchools.Schools" OnCreate="@CreateHandlerSchool" OnDelete="@DeleteHandlerSchool" OnUpdate="@UpdateHandlerSchool" OnRowRender="@OnRowRenderHandlerSchool">
<GridToolBar>
<GridCommandButton Command="Add" Icon="add">Add School</GridCommandButton>
</GridToolBar>
<GridColumns>
<GridColumn Field="@(nameof(School.SchoolName))">
<Template>
@((context as School).SchoolName.ToString())
</Template>
</GridColumn>
<GridColumn Field="@(nameof(School.SchoolAlloc))">
<Template>
@((context as School).SchoolAlloc.ToString("C"))
</Template>
</GridColumn>
<GridColumn Field="" Visible="true">
<Template>
@districtSchools.Dist.DISTRICT_ID
</Template>
<EditorTemplate>
@districtSchools.Dist.DISTRICT_ID
</EditorTemplate>
</GridColumn>
<GridCommandColumn>
<GridCommandButton Command="Edit" Icon="edit">Edit</GridCommandButton>
<GridCommandButton Command="Save" Icon="save" ShowInEdit="true">Update</GridCommandButton>
<GridCommandButton Command="Delete" Icon="delete">Delete</GridCommandButton>
<GridCommandButton Command="Cancel" Icon="cancel" ShowInEdit="true">Cancel</GridCommandButton>
</GridCommandColumn>
</GridColumns>
</TelerikGrid>
</DetailTemplate>
</TelerikGrid>
}
</DetailTemplate>
<GridColumns>
<GridColumn Field="@(nameof(Agency.AgencyName))" Editable="false">
<Template>
@((context as Agency).AgencyName.ToString())
</Template>
</GridColumn>
<GridColumn Field="@(nameof(Agency.AgencyAlloc))">
<Template>
@((context as Agency).AgencyAlloc.ToString("C"))
</Template>
</GridColumn>
<GridCommandColumn>
<GridCommandButton Command="Edit" Icon="edit">Edit</GridCommandButton>
<GridCommandButton Command="Save" Icon="save" ShowInEdit="true">Update</GridCommandButton>
<GridCommandButton Command="Cancel" Icon="cancel" ShowInEdit="true">Cancel</GridCommandButton>
</GridCommandColumn>
</GridColumns>
</TelerikGrid>
Pretty simple. With each release the product examples in the Github repo should be updated.
For example, I am looking at the drawer -> sidenav example. Before I can even run the example, I now need to go through all the code to make the updates from 2.14.1 to 3.4.0. Some of the changes that I have to make are:
I should not have to make these updates to look at an example, especially when it is referenced from a forum posting.
I should just be able to compile and run the example.