There seems to be no System.Type that will allow a GridColumn to be specified with the 'FieldType' attribute to receive a TelerikTimePicker
typeof(DateTime) --> TelerikDateTimePicker
typeof(?) --> TelerikTimePicker
<TelerikGrid Data="@gridDataExpando" Width="100%" Sortable="false" Pageable="false" Resizable="true" ShowColumnMenu="false"
ScrollMode="@GridScrollMode.Scrollable"
Height="100%"
EditMode="@GridEditMode.Incell"
OnUpdate="@UpdateHandlerExpando"
OnEdit="@EditHandler">
<GridColumns>
@{
var firstItem = gridDataExpando.FirstOrDefault();
if (firstItem != null)
{
var dictionaryItem = firstItem as IDictionary<string, object>;
foreach (var item in dictionaryItem)
{
if (!item.Key.Contains("Id"))
{
<GridColumn Field="@(item.Key)" FieldType="@(this.GetDataType(item.Key))" Width="140px" DisplayFormat="{0:hh:mm:ss tt}">
<HeaderTemplate>
<span>@item.Key</span>
</HeaderTemplate>
</GridColumn>
}
}
}
}
</GridColumns>
</TelerikGrid>
Using the grid with OnRead event to fill data. I need to set the sortings at runtime, so I use also the OnStateInit event.
It all works fine because OnStateInit fires before OnRead and I set the sorting inside OnStateInit.
If I put an empty GridAggregates then OnStateInit fires after OnRead thus inside OnRead I don't have the sortings set.
===
ADMIN EDIT
===
As a workaround for the time being, do not include empty GridAggregates tag, only add them when you actually want to include some aggregate functions.
If I group by a column, and one of the values in the column contains a forward slash ( '/'), then the value will not be grouped, the Grid ignores it.
The issue seems to occur only when LoadGroupsOnDemand is set to true.
===
ADMIN EDIT
===
A possible option for the time being is to disable the LoadGroupsOnDemand feature.
I am using Grid with Cell Selection enabled and DragToSelect="true". If I define a Template inside the GridColumn tag and I add a div inside that, SelectedCellsChanged event handler does not trigger if I start dragging by clicking on the div or if I drop inside that one.
Reproduction: https://blazorrepl.telerik.com/myasmnvQ46Jt7k5n50.
===
ADMIN EDIT
===
The only workaround for the time being is to disable the drag selection and let the user only select cells by clicking them. The cells will be selected even if the user clicks on the custom <div> element inside the template.
I am using a CheckBoxList filter menu and I am setting an initial filter through the OnStateInit. I noticed that when the Grid initializes and I check all the boxes, the Grid does not show any records. For reference, if no initial filter is applied and all CheckBoxes are selected, the Grid shows all the records.
Reproduction: https://blazorrepl.telerik.com/GSbbbJut14K03I2x14.
===
ADMIN EDIT
===
As a workaround for the time being, you may create a custom Filter Menu.
The issue targets a Grid with cell selection and DragToSelect feature disabled where at least one column has Visible="false". With this configuration, when using Shift + Click to select multiple cells, the result is a mismatch in the cells that should be selected, after the position where the invisible column is placed.
Video reproduction attached. Reproduction code: https://blazorrepl.telerik.com/GyFuQwPf37H8riAM19.
The Grid exits edit mode when expanding or collapsing rows in a hierarchy scenario. This only happens when OnStateChanged is set.
Test page that reproduces the behavior: https://blazorrepl.telerik.com/wIkJvdlo09hXCV8u03
On Hierarchy grids with Inline edit mode, I noticed that if a row is currently being edited and I try to expand the row to show the child grid an exception is thrown: "Error: System.InvalidOperationException: TelerikValidationComponent requires a cascading parameter of type EditContext. You can use Telerik.Blazor.Components.TelerikValidationTooltip`1[System.String] inside a EditForm or TelerikForm".
The problem stems from a validation tool inside the Grid EditorTemplate.
Feature Request
Currently, when a grid is rendered with 500 rows in a WASM application and expand/collapse action is initiated, it takes a few seconds to finish grouping and rendering.
Steps to reproduce
1. Create a grid in WASM app.
2. Add 500 rows.
3. Do not enable paging.
4. Group by any field and initiate expand/collapse.
5. All rows are re-rendered which leads to a few seconds delay.
The header cell includes the following inner elements when the Grid is sortable:
However, if I disable sorting all those elements are omitted which is not consistent.
The problem is when filtering programmatically, the X that is normally used to clear the search box disappears.
I am following the Telerik guide here. https://docs.telerik.com/blazor-ui/components/grid/filter/searchbox
The problem is actually demonstrated in the example from that page.
Filtering by typing:
Filtering programatically:
Thanks.
I have the following Grid setup:
Exception: System.ArgumentException: Operator 'IsEqualTo' is incompatible with operand types 'DateOnly?' and 'DateTime'
Hi,
I am using a Blazor TelerikGrid component with Virtual ScrollMode. I have set a fixed Height, PageSize that exceeds the rows that fit in the grid, and a RowHeight which I have confirmed fits the row contents and resolves to a computed Height of the same value (using Chrome Dev Tools -> Computed tab). Everything works fine except that sometimes scrolling does not trigger the OnRead event and the rows displayed after scrolling are placeholders.
I don't experience this problem when I click the scroll arrow buttons (up or down). I don't experience the problem at all if I drag the scroll bar up or down. But if I page up/down, or click on the scroll page area up/down it will sometimes work and sometimes not. If placeholders are shown, I only need to click a scroll button up/down a few times for it to then read and display the correct rows.
To reproduce use the attached VS2019 project, click "Telerik Scroll Issue" nav menu, and in the TelerikGrid click the page down areas of the vertical scrollbar 3 times.
<AdminEdit>
Hi Telerik Support
Facing an issue with Keyboard navigation in Telerik Grid component.
When we use TAB to navigate, the grid header gets focus only for the first time. After completing one round of navigation, second time after the Toolbar buttons, if we TAB out, focus goes to the pager sections skipping the grid header part.
Pls refer the REPL sample from Telerik website:
Steps to reproduce:
1) Use ALT + W and then use TAB key to navigate
2) First focus goes to the Toolbar button (Add Product), then goes to the Grid Header and then if we TAB again focus goes to the Pager section
3) After the Pager section, if we do steps 1 and 2 again, we can see that it skips the Grid Header focus second time onwards.
When filtering using a GridSearchBox - to filter across all columns, we have an issue where if you change a GridColumns Visible attribute to false that row will still be visible in the grid results even though it no longer matches the filter.
Take this snippet for example: Telerik REPL for Blazor - The best place to play, experiment, share & learn using Blazor.
1. Use Search box and search for a Name. e.g "Chang"
2. Click "Toggle Name Visibility" button
Expected: Since Name column is now hidden, the column should no longer be used in filter and the row should no longer be displayed. In reference to the GridSearchBox: https://docs.telerik.com/blazor-ui/components/grid/filter/searchbox#filter-from-code where it's mentioned that the search box will filter only on columns that are visible. It doesnt seem to refresh the filter.
Actual: Row still displayed even though it no longer matches filter
Just wanting to raise this as an issue and also hoping you may know a potential work-around for this?
A potential work-around I have tried is re-applying the existing filter in the search box by following documentation here in the "Filter From Code" section: https://docs.telerik.com/blazor-ui/components/grid/filter/searchbox#filter-from-code
While I am able to apply a filter from code I cannot seem to retrieve the value that is currently in the search box as I want to reuse it. How can I achieve this with a GridSearchBox? There doesnt seem to be a property available on the GridSearchBox component for binding it's value. Would I need to create a custom filter input to achieve this?
Here is the problem or bug I would like you to look at: If the percent entry component that is in the test application is not in an EditorTemplate, then the OnFocusOut event will fire in Firefox when the Tab or Enter keys is pressed. When the component is within an EditorTemplate, the OnFocusOut event does not fire in Firefox for the Tab/Enter key. This leads me to believe that it is a bug in the Grid and Treelist that is blocking that event from firing in Firefox.
Steps to reproduce:
---------------------ADMIN EDIT---------------------
There is one way you can use here to avoid manipulating the onfocusout event to handle percentage input. You can create in your model two properties/values. One value for visualization, with a custom format to represent percentage. Another value to pass along to the business logic, that has the actual fraction. You can see a reference to the described approach in this REPL link.
When I lock a column that has a footer, the footer should be locked too.
Column virtualization is enabled.
When using row virtualization, the visible rows are miscalculated when the browser zoom is used (hold control with mouse scroll).
The result of the miscalculation is that the first row at some point is not visible.
To reproduce the problem you should scroll to the top of the grid and see the first row.
Then start to zoom down and see how the first row is displaced.
Seems like only 50%, 100%, 150%, 200% (multiply of 50%) are calculated correctly in row virtualization
<AdminEdit>
You can reproduce the bug with the attached code.
It's browser-specific and is appearing only in chromium browsers.
It could be related to the way browsers calculate the size of the elements when zooming.
Currently, there is an open bug in the chromium: https://bugs.chromium.org/p/chromium/issues/detail?id=1048147&q=component%3AUI%3EBrowser%3EZoom%20height&can=2
</AdminEdit>
You can work around this by disabling virtual scrolling with something like this:
ScrollMode="@(Data.Count() > 30 ? GridScrollMode.Virtual : GridScrollMode.Scrollable)"