When a table row does not have any cells, there might be lots of script errors when hovering the empty row with the mouse.
The error is the following:
Sometimes we even have a server error:
Microsoft.JSInterop.JSException: Not a table node: table_wrapper
RangeError: Not a table node: table_wrapper
at https://somesite/caesar/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js?x=25.1.7.1096:23:1557112
at pl.get (https://somesite/caesar/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js?x=25.1.7.1096:23:1558816)
at https://somesite/caesar/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js?x=25.1.7.1096:23:1638148
at Be.decorations (https://somesite/caesar/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js?x=25.1.7.1096:23:1638538)
at https://somesite/caesar/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js?x=25.1.7.1096:23:1529498
at Wa.someProp (https://somesite/caesar/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js?x=25.1.7.1096:23:1548718)
at Fa (https://somesite/caesar/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js?x=25.1.7.1096:23:1529464)
at Wa.updateStateInner (https://somesite/caesar/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js?x=25.1.7.1096:23:1545305)
at Wa.update (https://somesite/caesar/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js?x=25.1.7.1096:23:1544591)
at Wa.setProps (https://somesite/caesar/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js?x=25.1.7.1096:23:1544734)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at Telerik.Blazor.Components.TelerikEditor.SetOptions()
at Telerik.Blazor.Components.TelerikEditor.OnParametersSetAsync()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
The server error is really hard to recreate, but it seems like users that has a slow computer and hovers the editor directly when loading gets this error sometimes...
Here is the source code (hovering the empty row will generate scripting errors):
<TelerikEditor Height="300px" @bind-Value="@Value" EditMode="Telerik.Blazor.EditorEditMode.Iframe" ReadOnly="true">
</TelerikEditor>
@code {
public string Value { get; set; } =
@"
<table>
<tbody>
<tr>
<td>
Some text
</td>
</tr>
<tr style=""height: 24px"">
</tr>
<tr>
<td>
Some text
</td>
</tr>
</tbody>
</table>
";
}There is an undocumented breaking change in the selection behavior of the v13.0.0 TreeView component that prevents us from upgrading from v12.3.0.
In v12.3.0, selecting a TreeView checkbox does change the TreeView item selection or trigger the selection change events. In v13.0.0, checking an item does also change the selection. The v12.3.0 behavior is important for our implementation because selecting a TreeView item in our application fetches data from a database and we do not want the performance overhead of those calls when checking an item---we want the user to be able to select multiple items and only then explicitly fetch the data for all of them.
I've created a minimal example here: https://blazorrepl.telerik.com/cqYdEePd40Zq3ava43. You can see the behavior differences when switching between versions.
Please let me know if there's any additional information we can provide. A workaround to this behavior would be appreciated. Thank you!
Even if setting ReadOnly="true", tables in the Editor can be resized...
This only happens in Iframe mode!
<TelerikEditor Height="300px" @bind-Value="@Value" EditMode="Telerik.Blazor.EditorEditMode.Iframe" ReadOnly="true">
</TelerikEditor>
@code {
public string Value { get; set; } =
@"
<table>
<tbody>
<tr>
<td>
Some text
</td>
</tr>
<tr style=""height: 24px"">
</tr>
<tr>
<td>
Some text
</td>
</tr>
</tbody>
</table>
";
}Currently working on moving from winform to Blazor and found a feature not supported in Telerik atm.
Getting current error when trying to enable Virtualiztion inside a grid
Groupable is not supported with the Virtualization feature of Telerik Grid
Where im already setting grouping on one of the columns
Hello,
seems like the GridToolbar(even the GridToolbarTemplate) in grid is not rendering "GridToolBarOverflowMode.Section". The "Scroll" mode is ok.
Is there any additional setup, or did i missed some setup...?
REPL:
https://blazorrepl.telerik.com/wqYQvvEq40GkajEZ30
based on:
https://www.telerik.com/blazor-ui/documentation/components/grid/toolbar
some mention about "sections" but it seems for another purpose:
https://www.telerik.com/blazor-ui/documentation/knowledge-base/common-net8-sections
Thanks
The PDF standard allows two ways to configure Acro fields and relate them to inputs (widget annotations):
Adobe Acrobat supports both options. Telerik PdfProcessing supports only the first option, which is more commonly used. The PDF Viewer supports only the second option. If the PDF Viewer loads a file with the first configuration, the component saves new field values in such a way that they can't be retrieved by PdfProcessing. Moreover, if the PDF file is opened locally, it looks like the new values are there, but when you click on a field, the original value shows. The new value behaves like a placeholder rather than a real value.
It is a very common occurrence to need to open a menu link in a new tab. Currently the prescribed way to do this is to create a Template for the Menu Items. This involves a lot of manual implementation (verbose template code, helper methods, changing the menu item object to not use the Url property so as to override the default UrlField behavior). This is a lot of extra work to accomplish a very common and simple task.
I propose that a new property be introduced to the Menu component (to be added to Menu Items) - a boolean field that defines whether or not to open the link in a new tab (i.e. "NewTab", or "External", or something of the like). It could default to false so that, in most cases, it could be ignored. But if set to true, the Menu component would handle adding "target='_blank'" and "rel='noopener noreferer'" to the link, while leaving all of the other functionality and styling in place.
It would greatly simplify the usage. And I would suggest that every programming who is building navigation menus would have a case where it's needed.
I would think, though I haven't looked at the core code yet, that this would be a relatively simple feature to add.
public class MenuItem
{
public string Text { get; set; }
public ISvgIcon? Icon { get; set; }
public string Url { get; set; } = string.Empty;
public bool NewTab { get; set; } = false;
public List<MenuItem>? Items { get; set; }
public MenuItem(string text, ISvgIcon? icon, string url, bool newTab, List<MenuItem>? items)
{
Text = text;
Icon = icon;
Url= url;
NewTab = newTab;
Items = items;
}
}Currently, a TextField value of empty string will produce a blank item in the dropdown.
On the other hand, a null TextField value will produce the fully qualified class name.
Here are possible workarounds: https://blazorrepl.telerik.com/myOlFpFb1465jW8E07
How to reproduce:
The regression was introduced in version 12.2.0. The last version that works correctly is 12.0.0.
The possible workarounds are:
@using System.ComponentModel.DataAnnotations
@using Telerik.DataSource
@using Telerik.DataSource.Extensions
<TelerikGrid @ref="@GridRef"
OnRead="@OnGridRead"
TItem="@Product"
EditMode="@GridEditMode.Incell"
OnCreate="@OnGridCreate"
OnDelete="@OnGridDelete"
OnUpdate="@OnGridUpdate"
Height="600px">
<GridToolBarTemplate>
<GridCommandButton Command="Add">Add Item</GridCommandButton>
</GridToolBarTemplate>
<GridColumns>
<GridColumn Field="@nameof(Product.Name)">
<EditorTemplate>
@{ var dataItem = (Product)context; }
<span @onfocusout="@( async () => await OnGridCellFocusOut(nameof(Product.Name)) )">
<TelerikTextBox @bind-Value="@dataItem.Name" />
</span>
</EditorTemplate>
</GridColumn>
@* <GridColumn Field="@nameof(Product.Price)" DisplayFormat="{0:C2}" />
<GridColumn Field="@nameof(Product.Quantity)" DisplayFormat="{0:N0}" />
<GridColumn Field="@nameof(Product.ReleaseDate)" DisplayFormat="{0:d}" /> *@
<GridColumn Field="@nameof(Product.Discontinued)" Width="120px">
<EditorTemplate>
@{ var dataItem = (Product)context; }
<span @onfocusout="@( async () => await OnGridCellFocusOut(nameof(Product.Discontinued)) )">
<TelerikCheckBox @bind-Value="@dataItem.Discontinued" />
</span>
</EditorTemplate>
</GridColumn>
<GridCommandColumn Width="180px">
<GridCommandButton Command="Delete">Delete</GridCommandButton>
</GridCommandColumn>
</GridColumns>
</TelerikGrid>
@code {
private TelerikGrid<Product>? GridRef { get; set; }
private ProductService GridProductService { get; set; } = new();
private async Task OnGridCellFocusOut(string field)
{
await Task.Delay(100);
if (GridRef is null)
{
return;
}
GridState<Product> gridState = GridRef.GetState();
Product? editItem = gridState.EditItem as Product;
if (editItem is null)
{
return;
}
GridCommandEventArgs args = new GridCommandEventArgs()
{
Field = field,
Item = editItem
};
await OnGridUpdate(args);
gridState.EditField = default;
gridState.EditItem = default!;
gridState.OriginalEditItem = default!;
await GridRef.SetStateAsync(gridState);
}
private async Task OnGridCreate(GridCommandEventArgs args)
{
var createdItem = (Product)args.Item;
await GridProductService.Create(createdItem);
}
private async Task OnGridDelete(GridCommandEventArgs args)
{
var deletedItem = (Product)args.Item;
await GridProductService.Delete(deletedItem);
}
private async Task OnGridRead(GridReadEventArgs args)
{
DataSourceResult result = await GridProductService.Read(args.Request);
args.Data = result.Data;
args.Total = result.Total;
args.AggregateResults = result.AggregateResults;
}
private async Task OnGridUpdate(GridCommandEventArgs args)
{
var updatedItem = (Product)args.Item;
await GridProductService.Update(updatedItem);
}
public class Product
{
public int Id { get; set; }
[Required]
public string Name { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public decimal? Price { get; set; }
public int Quantity { get; set; }
[Required]
public DateTime? ReleaseDate { get; set; }
public bool Discontinued { get; set; }
}
#region Data Service
public class ProductService
{
private List<Product> Items { get; set; } = new();
private int LastId { get; set; }
public async Task<int> Create(Product product)
{
await SimulateAsyncOperation();
product.Id = ++LastId;
Items.Insert(0, product);
return LastId;
}
public async Task<bool> Delete(Product product)
{
await SimulateAsyncOperation();
if (Items.Contains(product))
{
Items.Remove(product);
return true;
}
return false;
}
public async Task<List<Product>> Read()
{
await SimulateAsyncOperation();
return Items;
}
public async Task<DataSourceResult> Read(DataSourceRequest request)
{
return await Items.ToDataSourceResultAsync(request);
}
public async Task<bool> Update(Product product)
{
await SimulateAsyncOperation();
int originalItemIndex = Items.FindIndex(x => x.Id == product.Id);
if (originalItemIndex != -1)
{
Items[originalItemIndex] = product;
return true;
}
return false;
}
private async Task SimulateAsyncOperation()
{
await Task.Delay(100);
}
public ProductService(int itemCount = 5)
{
Random rnd = Random.Shared;
for (int i = 1; i <= itemCount; i++)
{
Items.Add(new Product()
{
Id = ++LastId,
Name = $"Product {LastId}",
Description = $"Multi-line\ndescription {LastId}",
Price = LastId % 2 == 0 ? null : rnd.Next(0, 100) * 1.23m,
Quantity = LastId % 2 == 0 ? 0 : rnd.Next(0, 3000),
ReleaseDate = DateTime.Today.AddDays(-rnd.Next(365, 3650)),
Discontinued = LastId % 2 == 0
});
}
}
}
#endregion Data Service
}
The DropDownTree does not show its selected value if the data is set asynchronously.
Possible workarounds include:
Test page:
DropDownTreeValue1: @DropDownTreeValue1
<br />
DropDownTreeValue2: @DropDownTreeValue2
<br />
Bug:
<TelerikDropDownTree Data="@DropDownTreeData"
@bind-Value="@DropDownTreeValue1"
@bind-ExpandedItems="@DropDownTreeExpandedItems"
Width="300px">
</TelerikDropDownTree>
Workaround:
<TelerikDropDownTree Data="@DropDownTreeData"
@bind-Value="@DropDownTreeValue2"
@bind-ExpandedItems="@DropDownTreeExpandedItems"
Width="300px">
</TelerikDropDownTree>
@* Render DropDownTree after setting Data *@
@if (DropDownTreeData is not null)
{
<span>Workaround:</span>
<TelerikDropDownTree Data="@DropDownTreeData"
@bind-Value="@DropDownTreeValue1"
@bind-ExpandedItems="@DropDownTreeExpandedItems"
Width="300px">
</TelerikDropDownTree>
}
@code {
private List<TreeItem>? DropDownTreeData { get; set; }
private int DropDownTreeValue1 { get; set; }
private int DropDownTreeValue2 { get; set; }
private IEnumerable<object> DropDownTreeExpandedItems { get; set; } = new List<TreeItem>();
protected override async Task OnInitializedAsync()
{
DropDownTreeValue1 = 3;
await Task.Delay(1000);
DropDownTreeData = LoadFlatData();
// Set DropDownTree Value after setting Data
DropDownTreeValue2 = 3;
DropDownTreeExpandedItems = DropDownTreeData.Where(x => x.ParentId is null && x.HasChildren);
}
private int TreeLevels { get; set; } = 3;
private int RootItems { get; set; } = 2;
private int ItemsPerLevel { get; set; } = 2;
private int IdCounter { get; set; }
private List<TreeItem> LoadFlatData()
{
List<TreeItem> items = new List<TreeItem>();
PopulateChildren(items, null, 1);
return items;
}
private void PopulateChildren(List<TreeItem> items, int? parentId, int level)
{
var itemCount = level == 1 ? RootItems : ItemsPerLevel;
for (int i = 1; i <= itemCount; i++)
{
var itemId = ++IdCounter;
items.Add(new TreeItem()
{
Id = itemId,
ParentId = parentId,
HasChildren = level < TreeLevels,
Text = $"Level {level} Item {i} Id {itemId}",
Value = itemId
});
if (level < TreeLevels)
{
PopulateChildren(items, itemId, level + 1);
}
}
}
public class TreeItem
{
public int Id { get; set; }
public int? ParentId { get; set; }
public bool HasChildren { get; set; }
public string Text { get; set; } = string.Empty;
public int Value { get; set; }
}
}
The problem is caused by the tab index of the tab headers not being updated properly. The first one seems to have 0 at all times, while all others stay at -1. Instead, the active tab header should have tab index 0, while all others get -1.
We are using a "TelerikWindow" that does neither contain the "WindowAction" "Minimize" nor "Maximize", since we do not want the user to do so. It is still possible, however, to minimize / maximize the window using the keyboard shortcuts described here: https://demos.telerik.com/blazor-ui/window/keyboard-navigation
We came up with a hack to work around the current behaivor:
Hello Telerik team,
I recently noticed a bug in the TelerikComboBox component. The TelerikDropDownList component is affected in the same way, however. I created the following REPL to demonstrate this: https://blazorrepl.telerik.com/wKamcLaN08Q5Ntu600
If these two components have data and you select an entry, the focus gets reset to the component and you can use the Tab key to navigate to the next element:
If there is no data and you click on the dropdown, it closes, but the focus is lost. Since the components are used in a modal window here, the user can even escape the focus trap this way:
Regards,
Alex
Similar to "AllowedExtensions", please add a "DisallowedExtensions". My filing system requires every type of file to be allowed except certain executables and I don't know of any workaround.
Thank you in advance.
I added this as a forum feature request and I ended up here! I hope I'm on the right path.
Current limitation: When DiagramShapeDefaultsEditable.Connect="true",
users can draw connections between shapes, but there is no event fired
when a new connection is created by the user.
Requested feature: Add OnConnectionCreated event that:
Use case: We need to capture user-created connections to persist them to database, validate business rules (e.g., prevent circular dependencies), and set connection properties (type, label, color) based on context.