I like the ability to select a row by clicking on a checkbox. But the handler for clicking on the row supplies the contents of the row where as putting a GridCheckbox like
<
GridColumns
>
<
GridCheckboxColumn
ValueChanged="@((bool value) => ValueChanged(value))"/>
only gives me the state of the checkbox. Is there anyway to have the row click handler also respond to the checkbox? Or how can I get the contents of the row that the checkbox that was clicked is on?
Hi,
Is it possible to get event when user click/double click task on Gantt chart (grid/timeline). We should update some properties based on selected task.
Is it possible to create new dialog for popup editing?
I am trying to use the Telerik.Blazor.Components.TelerikNumericTextBox.
Upon opening the form in question, I receive the following in the output window:
[2022-05-18T14:08:20.156Z] Error: System.AggregateException: One or more errors occurred. (Format specifier was invalid.)
---> System.FormatException: Format specifier was invalid.
at System.Number.NumberToString(ValueStringBuilder& sb, NumberBuffer& number, Char format, Int32 nMaxDigits, NumberFormatInfo info)
at System.Number.FormatDecimal(Decimal value, ReadOnlySpan`1 format, NumberFormatInfo info)
at System.Decimal.ToString(String format, IFormatProvider provider)
at Telerik.Blazor.Common.Parsers.TelerikGenericDecimal`1.Format(T value, String format)
at Telerik.Blazor.Components.TelerikNumericTextBox`1.get_FormattedValue()
at Telerik.Blazor.Components.TelerikNumericTextBox`1.get_Text()
at Telerik.Blazor.Components.TelerikNumericTextBox`1.GetNumericTextBoxOptions()
at Telerik.Blazor.Components.TelerikNumericTextBox`1.OnAfterRenderAsync(Boolean firstRender)
The razor markup for the control is:
<TelerikNumericTextBox Width=@ControlWidth.ToString()
@bind-Value="@NumericValue"
Decimals="2"
Format="D"
Id=@FieldProperties.Field_Name
OnChange="@TextOnChangeHandler"/>
Right now the control is bound to a Decimal Property (public decimal NumericValue)
and the initial value is hardcoded to 1200.26M
Any assistance would be appreciated.
Hello -
I've been really enjoying my time with the Telerik Blazor Grid component, but I'm running into trouble with the filtering functionality. This is using a Blazor Web Assembly Client with a ASP.NET Core 3 backend. When my client requests data from the API without a filter, I get appropriate responses as expected. Paging works great, everything is good. As soon as I try any off-the-shelf filter, I get an error response from the server with the message :
Could not create an instance of type Telerik.DataSource.IFilterDescriptor. Type is an interface or abstract class and cannot be instantiated.
It looks like this is some sort of deserialization error that is being run into when the server is trying to parse my DataSourceRequest. It gets parsed fine without a filter, but as soon as I try to filter, I get the above message.
Has anyone else seen and tackled this problem? Thanks much!
- Chris
I don't see any loading indicator when going between pages of a grid with remote data... are there plans for this?
I am using a TreeView control that displays checkboxes for each node and the checked state of each node seems to get lost when the parent node is collapsed and expanded again. However, this only seems to happen when the OnExpand event is handled. Remove the OnExpand event handler and everything works as expected. It doesn't seem to make a difference if the event args property ShouldRender is set to true. Happens for both flat and hierarchical data.
Can't imagine that this is the desired behaviour. If it is then is there any way around it as I do need to handle the OnExpand event in my code behind.
The following is test page the displays this problem...
@page "/treeview"
@using System.Linq
<TelerikTreeView Data="@Data" CheckBoxMode="@TreeViewCheckBoxMode.Multiple" CheckChildren="true" CheckParents="true"
@bind-CheckedItems="@CheckedItems" OnExpand="@OnExpandHandler">
@*@bind-ExpandedItems="@ExpandedItems"*@
<TreeViewBindings>
<TreeViewBinding IdField="Id" TextField="Text" HasChildrenField="HasChildren" ItemsField="Children">
<ItemTemplate>
@{
var item = context as MyTreeItem;
<div>@item.Id.ToString() : @item.Text</div>
}
</ItemTemplate>
</TreeViewBinding>
</TreeViewBindings>
</TelerikTreeView>
@code {
private IEnumerable<MyTreeItem> Data { get; set; }
private IEnumerable<object> CheckedItems { get; set; } = Enumerable.Empty<object>();
private IEnumerable<object> ExpandedItems { get; set; } = Enumerable.Empty<object>();
private int LastID = 0;
protected override void OnInitialized()
{
Data = CreateNodeList("one", "two", "three", 3);
}
private List<MyTreeItem> CreateNodeList(string name1, string name2, string name3, int levels = 0)
{
var list = new List<MyTreeItem>();
list.Add(CreateNode(name1, levels));
list.Add(CreateNode(name2, levels));
list.Add(CreateNode(name3, levels));
return list;
}
private MyTreeItem CreateNode(string name, int levels)
{
LastID++;
var node = new MyTreeItem { Id = LastID, Text = name };
if (levels > 0)
{
node.Children = CreateNodeList($"{name} - one", $"{name} - two", $"{name} - three", levels - 1);
}
return node;
}
private async Task OnExpandHandler(TreeViewExpandEventArgs args)
{
//await InvokeAsync(StateHasChanged);
//args.ShouldRender = true;
}
private class MyTreeItem
{
public int Id { get; set; } = 0;
public string Text { get; set; } = "";
public IList<MyTreeItem> Children { get; set; } = null;
public bool HasChildren => Children is not null && Children.Count > 0;
}
}
Hi,
Is there a way to change the position of the small Arrow of the tooltip through css ?
thx!
Hello,
I'm still trying to produce a reproducible scenario in Repl to share, but upgrading to 3.3.0 broke our treeview drop code. If I revert back to 3.2.0 it begins to work properly again. I have a typical tree with several "folders" & "files" which I can drag and drop to re-organize. The only time telerik shows the circle with a slash drag hint is when you drag the source node over top itself. In 3.3.0 it seems that the circle with the slash is showing up over most but not all of the nodes in the tree. I can't explain why it thinks some areas are valid drop targets and others are not. One node is fine to drop on and the next and previous ones show the No Drop icon.
I'll continue to try and make a Repl example but wanted to raise awareness of this sooner than later.
Thanks,
-Andy