The Grid resets and disables the adaptive mode for a column menu if the column has been hidden. The component also uses the previous adaptive mode that is no longer correct if the browser window is resized.
Steps to reproduce:
Test page:
<TelerikGrid Data="@GridData"
AdaptiveMode="@AdaptiveMode.Auto"
FilterMode="GridFilterMode.FilterMenu"
ShowColumnMenu="true">
<GridColumns>
<GridColumn Field="@nameof(Product.Name)" />
<GridColumn Field="@nameof(Product.Group)" />
<GridColumn Field="@nameof(Product.Price)" DisplayFormat="{0:c2}" />
<GridColumn Field="@nameof(Product.Quantity)" DisplayFormat="{0:n0}" />
<GridColumn Field="@nameof(Product.Released)" DisplayFormat="{0:d}" />
<GridColumn Field="@nameof(Product.Discontinued)" />
</GridColumns>
</TelerikGrid>
@code {
private List<Product> GridData { get; set; } = new();
protected override void OnInitialized()
{
var rnd = Random.Shared;
for (int i = 1; i <= 3; i++)
{
GridData.Add(new Product()
{
Id = i,
Name = $"Name {i} {(char)rnd.Next(65, 91)}{(char)rnd.Next(65, 91)}",
Group = $"Group {i % 3 + 1}",
Price = rnd.Next(1, 100) * 1.23m,
Quantity = rnd.Next(0, 10000),
Released = DateTime.Today.AddDays(-rnd.Next(60, 1000)),
Discontinued = i % 4 == 0
});
}
}
public class Product
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Group { get; set; } = string.Empty;
public decimal Price { get; set; }
public int Quantity { get; set; }
public DateTime Released { get; set; }
public bool Discontinued { get; set; }
}
}
Customers report inconsistent in-cell editing behavior with DatePicker columns in the Grid.
Here is a REPL test page that reproduces the issue (first date column) and provides a workaround (second date column):
https://blazorrepl.telerik.com/QAErkrEh090ykIxR16
The workaround relies on Grid EditorTemplate, the DatePicker OnClose event, and programmatic Grid edit mode management. The relevant code is:
@using System.ComponentModel.DataAnnotations
<TelerikGrid @ref="@GridRef"
Data="@GridData"
EditMode="@GridEditMode.Incell"
OnUpdate="@OnGridUpdate"
OnCreate="@OnGridCreate">
<GridToolBarTemplate>
<GridCommandButton Command="Add">Add Item</GridCommandButton>
</GridToolBarTemplate>
<GridColumns>
<GridColumn Field="@nameof(Product.Name)" />
<GridColumn Field="@nameof(Product.StartDate)" Title="BUG" DisplayFormat="{0:d}" />
<GridColumn Field="@nameof(Product.EndDate)" Title="WORKAROUND" DisplayFormat="{0:d}">
<EditorTemplate>
@{ var editItem = (Product)context; }
<TelerikDatePicker Value="editItem.EndDate"
ValueChanged="@((DateTime? newValue) => OnGridDatePickerValueChanged(newValue, editItem))"
ValueExpression="@( () => editItem.EndDate )"
OnClose="@(async () => await OnGridDatePickerClose(editItem))" />
</EditorTemplate>
</GridColumn>
</GridColumns>
</TelerikGrid>
@code {
#nullable enable
private TelerikGrid<Product>? GridRef;
private List<Product> GridData { get; set; } = new();
private int LastId { get; set; }
private DateTime LastDatePickerValueChanged { get; set; } = DateTime.Now;
private void OnGridDatePickerValueChanged(DateTime? newValue, Product editItem)
{
editItem.EndDate = newValue;
LastDatePickerValueChanged = DateTime.Now;
}
private async Task OnGridDatePickerClose(Product editItem)
{
if (DateTime.Now - LastDatePickerValueChanged > TimeSpan.FromMilliseconds(500))
{
GridState<Product> gridState = GridRef!.GetState();
if (gridState.EditItem is not null && gridState.EditItem.Id == editItem.Id)
{
// Uncomment to perform an item update instead of cancel
// OnGridUpdate(new GridCommandEventArgs { Item = editItem });
gridState.OriginalEditItem = null!;
gridState.EditItem = null!;
await GridRef.SetStateAsync(gridState);
}
}
}
private void OnGridCreate(GridCommandEventArgs args)
{
var createdItem = (Product)args.Item;
createdItem.Id = ++LastId;
GridData.Insert(0, createdItem);
}
private void OnGridUpdate(GridCommandEventArgs args)
{
var updatedItem = (Product)args.Item;
var originalItemIndex = GridData.FindIndex(i => i.Id == updatedItem.Id);
if (originalItemIndex != -1)
{
GridData[originalItemIndex] = updatedItem;
}
}
protected override void OnInitialized()
{
for (int i = 1; i <= 5; i++)
{
GridData.Add(new Product()
{
Id = ++LastId,
Name = $"Product {LastId}",
Price = Random.Shared.Next(0, 100) * 1.23m,
Quantity = Random.Shared.Next(0, 1000),
StartDate = DateTime.Today.AddDays(-Random.Shared.Next(60, 1000)),
EndDate = DateTime.Today.AddDays(Random.Shared.Next(1, 60)),
IsActive = LastId % 4 > 0
});
}
}
public class Product
{
public int Id { get; set; }
[Required]
public string Name { get; set; } = string.Empty;
public decimal Price { get; set; }
public int Quantity { get; set; }
public DateTime? StartDate { get; set; }
public DateTime? EndDate { get; set; }
public bool IsActive { get; set; }
}
}
The Telerik UI for Blazor TimePicker currently does not appear to expose an equivalent to the Kendo UI for jQuery TimePicker "focusTime" option.
https://github.com/telerik/kendo-ui-core/blob/master/docs/api/javascript/ui/timepicker.md#focustime-datedefault-null
In Kendo UI for jQuery, focusTime allows the popup to open with a specific time focused without actually setting the selected value. This is useful when the picker has no value yet.
For example, let's say we want the time-picker to open up with the placeholder value of 08:00, how would we achieve this in Telerik UI for Blazor? Currently it defaults the placeholder to the current time.
Thanks
If the element of the tooltip is on top of the screen (almost outside of the viewport), hovering the remaining part of the element makes the tooltip create a flashing effect.
Please watch the attached video.
When I place a tooltip on drawer item, it just flickers randomly
![[video-to-gif output image]](https://im3.ezgif.com/tmp/ezgif-3-4372cd0f87.gif)
https://blazorrepl.telerik.com/wQbbmbGb05hzznPh45
(bug report only)
Reproducible in the demos: https://demos.telerik.com/blazor-ui/dropdowntree/overview
(optional)
For a brief moment the filter input in the dropdown appears focused, but then the focus moves to the first item in the list. If the user clicks the “down arrow” icon to open the dropdown, the filter input is focused as expected.
The filter input is focused regardless where in the component the user clicks.
(bug report only)
(optional)
Provide additional information if the steps for reproducing the faulty behavior are not sufficient to describe the issue.
The FontFamily tool should keep its value when an unordered list is added/removed.
(bug report only)
1. Run this example: https://blazorrepl.telerik.com/cAkKcTYZ39RLN4r548
2. Open the ComboBox popup and navigate through the items in the list by holding down “Down Arrow” key, or by pressing the key rapidly.
(optional)
An exception is thrown and instead of continuing with the next batch of items, navigation is stuck on the first item in the list.
Navigation continues from the next loaded batch of items.
I am resetting the Grid State by calling Grid.SetState(null). This doesn't reset ColumnState<T>.Locked boolean to false and the columns remain locked.
---
ADMIN EDIT
---
A possible workaround for the time being is to additionally loop through the ColumnStates collection of the State and set the Locked property to false for each column.
I have the following configuration:
Editor component in Grid EditorTemplate and the Grid editing mode is popup
Here is a REPL example https://blazorrepl.telerik.com/QeuUwsvb15sxbLuB04
The popup that opens when editing the Grid resizes when I type in the Editor
Steps to reproduce the issue:
1. Run the REPL example
2. Click the Edit button in the Grid
3. Resize the popup
4. Start to type something in the Editor
5. The popup resizes
When a user navigates the DatePicker’s calendar using arrow keys, the component updates aria-activedescendant in the wrong order; it removes the id reference from the current cell before assigning it to the new cell. This creates a brief window in which aria-activedescendant points to an id that doesn't exist in the DOM.
(bug report only)
1. Run this example: https://blazorrepl.telerik.com/GgEKuoPQ289mGAyo13
Inspect the selected date in the calendar, select "break on attribute modification" for the td element of the selected date and the next td element. Navigate with "Right Arrow" key from the selected to the next date.
(optional)
The id of the selected date's td element is removed, but the DatePicker input’s aria-activedescendant attribute still has this id as value. Then the newly focused cell gets an id and it is set to the aria-activedescendant.
The element referenced by aria-activedescendant must be in the DOM (https://www.w3.org/TR/wai-aria-1.2/#aria-activedescendant)
(bug report only)
Run this example and follow the instructions in it: https://blazorrepl.telerik.com/GAkAvYaB36nYAsr539
(optional)
Indent does not work inside lists.
Indent works inside lists.
(bug report only)
The issue is reproducible when SlotDivisions is set to 1. If it is set to 2, or 3, the events are displayed correcty.
1. Run the following example: https://blazorrepl.telerik.com/wKOgYNbv564C2KOK04
(optional)
Events overlap.
Events are shown stacked.
Hello,
after playing with AI chat integration with telerikgrid, few bumps up shows:
lets have this scenario- request from aichat, to perform some filtering/operations on grid with clumn names like col1,col2,col3... generic.
public async Task<GridAIResponse> GetGridAIData(GridAIRequestDescriptor request)
{
var options = new ChatOptions();
var columnsx = JsonSerializer.Deserialize<List<GridAIColumn>>(JsonSerializer.Serialize(request.Columns));
options.Tools = new List<AITool>();
options.Tools.Clear();
1) //describe the columns or general behavior like "aprox, arround, near"
var ff = ChatOptionsExtensions.GetFilter(columnsx);
ForceSetDescription(ff, @"
If users enters phrases like 'aprox', 'arround', 'near',
operate with field value in between ±10 %.
Example: 'dimensions arround 1000' results in: 'dimension >= 900 AND dimension<= 1100'.
");
options.Tools.Add(ff);
options.Tools.Add(ChatOptionsExtensions.GetSort(columnsx));
ChatResponse completion = await _chatClient.GetResponseAsync(conversationMessages, options);
....
return completion.ExtractGridResponse();
}how to extend "GridAIRequestDescriptor"?
1) - ability to describe column(add). but Description is readonly (coders should add titles or any text manually from column definition - be aware. grid IColumn is accessible only by reflection just now)
OR
2) - ability to specify the "meaninfgull name" (place, where coders can add this)
OR
3)- instead of using just "Fieldname" of the column, use/add the Title(which is more understandable for LLM)
OR
4) field mapping translation layer. GridColumn.Field -> something descriptive and back after fetching response from LLM
fieldnames are mostly "system DB name" and cannot be changed. So FieldName="Column44qty" and Title="qty available stock", you get the point which one tells you more.
new[]
{
new {
Field = "Column44qty",
Title = ""qty available stock",
Type = "number",
Description = "......",
Values = new[] { "x", "yyy", "zzz" }
},...
}
all points 1-4 are not needed, just one of them is ok.
If the ComboBox Value is set during initialization and the ValueMapper executes too fast and before the component has rendered, its Value doesn't show.
The problem also occurs in the MultiColumnComboBox.
Possible workarounds:
To reproduce:
@using Telerik.DataSource
@using Telerik.DataSource.Extensions
<p>ComboBox Value: @ComboBoxValue</p>
<TelerikComboBox ItemHeight="30"
OnRead="@OnComboBoxRead"
PageSize="20"
ScrollMode="@DropDownScrollMode.Virtual"
TItem="@ListItem"
TValue="@(int?)"
@bind-Value="@ComboBoxValue"
ValueMapper="@ComboBoxValueMapper"
Width="240px" />
@code {
private List<ListItem>? ComboBoxData { get; set; }
private int? ComboBoxValue { get; set; } = 3;
private async Task OnComboBoxRead(ReadEventArgs args)
{
DataSourceResult result = await ComboBoxData.ToDataSourceResultAsync(args.Request);
args.Data = result.Data;
args.Total = result.Total;
}
private async Task<ListItem?> ComboBoxValueMapper(int? selectValue)
{
// Triggers the bug
await Task.Yield();
ListItem? result = ComboBoxData?.FirstOrDefault(x => selectValue == x.Value);
return result;
}
protected override void OnInitialized()
{
ComboBoxData = Enumerable
.Range(1, 1234)
.Select(x => new ListItem()
{
Value = x,
Text = $"Item {x}"
})
.ToList();
}
public class ListItem
{
public int Value { get; set; }
public string Text { get; set; } = string.Empty;
}
}