Telerik Forums
UI for Blazor Forum
9 answers
551 views

I want to create character shortcuts and be able to default the date based on the shortcut.  This would be similar to how quicken does it within quickbooks.  In other words, I want the user to be able to type the letter 'T' for today's date.  M for the first day of the month, and so on.

I check the OnValueChangedHandler but it doesn't seem to fire for non-numeric characters.

Any help would be appreciated,

Joe

Marin Bratanov
Telerik team
 answered on 17 Jan 2020
2 answers
747 views

I am trying to use the Telerik Grid but am getting an error: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer: Warning: Unhandled exception rendering component: An item with the same key has already been added. Key: Title

Version = 2.6.0

I have a List called skills that holds a list of Skill objects

The Skill object has a string property called Title

The Skill object has an object property called Department

The Department object has a string property called Title as well.

In the grid I want to show the Title from the Skill and the Title from the Department...here is the code

<TelerikGrid Data="@skills" Height="calc(100vh - 150px)" Pageable="false" Sortable="true" Groupable="true" FilterMode="Telerik.Blazor.GridFilterMode.FilterRow" Resizable="false" Reorderable="true">
    <GridColumns>
        <GridColumn Field="@(nameof(Skill.Title))"></GridColumn>
        <GridColumn Field="@(nameof(Skill.Department.Title))" Title="Department"></GridColumn>
    </GridColumns>
</TelerikGrid>

 

But I am getting this error and I can't seem to find a way to work around it without creating a custom class.

Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer: Warning: Unhandled exception rendering component: An item with the same key has already been added. Key: Title

System.ArgumentException: An item with the same key has already been added. Key: Title
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at Telerik.Blazor.Components.Grid.Extensions.ColumnExtensions.GroupTitles(IEnumerable`1 columns)
   at Telerik.Blazor.Components.TelerikGridBase`1.GetGroupTitles()
   at Telerik.Blazor.Components.TelerikGrid`1.<BuildRenderTree>b__0_1(RenderTreeBuilder __builder2)
   at Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.AddContent(Int32 sequence, RenderFragment fragment)
   at Microsoft.AspNetCore.Components.CascadingValue`1.Render(RenderTreeBuilder builder)
   at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderInExistingBatch(RenderQueueEntry renderQueueEntry)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost: Error: Unhandled exception in circuit 'nYpuCoL1tuhOnJfvQJicLrdf3xOuc3npfnJ-aZdQ7EA'.

 

Roger
Top achievements
Rank 1
 answered on 17 Jan 2020
1 answer
175 views
I noticed this in 2.6.0 and it appears to also be present in 2.6.1. When using a filter row the clear filter button refreshes the grid with the filter removed as expected but the filter text is not removed from the textbox. I am attaching an example.
Marin Bratanov
Telerik team
 answered on 16 Jan 2020
3 answers
1.8K+ views

Hi,

I am having trouble getting cell specific data in response to a click event on an href that is defined in my row template.

Below is a rough idea of what I am doing.

<RowTemplate Context="rowCtx">
<td>
    <a href="#" id="@(rowCtx.CellSpecificId1)" @onclick="@(e => HandleClick(rowCtx.CellSpecificId)"  @onclick:preventDefault>
</td>
<td>
    <a href="#" id="@(rowCtx.CellSpecificId2)" @onclick="@(e => HandleClick(rowCtx.CellSpecificId)"  @onclick:preventDefault>
</td>
<td>
    <a href="#" id="@(rowCtx.CellSpecificId3)" @onclick="@(e => HandleClick(rowCtx.CellSpecificId)"  @onclick:preventDefault>
</td>
</RowTemplate>

The problem seems to be that no matter what, the LAST rowCtx.CellSpecificId is passed to my event handler instead of the cell I want.

In the code above, if I click on teh first href, in the first <td>, I get the CellSpecificId3 instead of 1

Can someone share with me how to get a specific cell's value/id/whatever passed to the event handler? Seems like this should be easy, but it's not.

Basically, I want to pop a dialog that displays info for a clicked on cell. I am not married to the anchor tag. If there is a better way (i.e. one that works!), I'm all ears.

Thanks … Ed

 

 

 

Marin Bratanov
Telerik team
 answered on 14 Jan 2020
1 answer
2.4K+ views
Is there a way to set the filters from the code-behind? 
Marin Bratanov
Telerik team
 answered on 13 Jan 2020
4 answers
1.9K+ views
How do I adjust the space between label and field when inputting text?By default it's awfully close to the box.
Tim
Top achievements
Rank 2
 answered on 13 Jan 2020
1 answer
306 views

Hi,

Why does the TelerikTextBox activate the <ValidationSummary /> while typing in the field?

Is there a way to disable this behaviour?   

Marin Bratanov
Telerik team
 answered on 11 Jan 2020
1 answer
528 views
How can I collapse all groups when I drag a column to group it ? 
Marin Bratanov
Telerik team
 answered on 11 Jan 2020
3 answers
862 views

I either need a Toaster to notify users of changes or even errors that automatically go away after a set time out. Will there be something like this in Blazor controls?  If not do you have a general MessageBox modal dialog?

 

Thanks.

SL
Top achievements
Rank 1
Veteran
 answered on 10 Jan 2020
6 answers
1.0K+ views

My project is using the client/webassembly template and I get this error when I sort on the Grid.  I am using CSLA business objects to bind to the grid by the way.  It should just work since it derives from IEnumerable<T>.  The TelerikBlazorApp project sample uses a plain List<WeaterForecast> so I wonder why it doesn't work with the CSLA BusinessList.

Thanks.

 

blazor.webassembly.js:1 WASM: Unhandled exception rendering component:
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM: System.InvalidOperationException: No generic method 'OrderBy' on type 'System.Linq.Queryable' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic.
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM:   at System.Linq.Expressions.Expression.FindMethod (System.Type type, System.String methodName, System.Type[] typeArgs, System.Linq.Expressions.Expression[] args, System.Reflection.BindingFlags flags) <0x2a500d8 + 0x0012e> in <c9598198a7e340e28f933e3bfe55dba1>:0
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM:   at System.Linq.Expressions.Expression.Call (System.Type type, System.String methodName, System.Type[] typeArguments, System.Linq.Expressions.Expression[] arguments) <0x2a4fde8 + 0x00046> in <c9598198a7e340e28f933e3bfe55dba1>:0
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM:   at Telerik.DataSource.SortDescriptorCollectionExpressionBuilder.Sort () <0x2d18610 + 0x00142> in <b8e61d62238c4666b5ff65df7544c779>:0
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM:   at Telerik.DataSource.Extensions.QueryableExtensions.Sort (System.Linq.IQueryable source, System.Collections.Generic.IEnumerable`1[T] sortDescriptors) <0x2d18370 + 0x00014> in <b8e61d62238c4666b5ff65df7544c779>:0
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM:   at Telerik.DataSource.Extensions.QueryableExtensions.CreateDataSourceResult[TModel,TResult] (System.Linq.IQueryable queryable, Telerik.DataSource.DataSourceRequest request, System.Func`2[T,TResult] selector) <0x2a47060 + 0x002fe> in <b8e61d62238c4666b5ff65df7544c779>:0
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM:   at Telerik.DataSource.Extensions.QueryableExtensions.ToDataSourceResult (System.Linq.IQueryable queryable, Telerik.DataSource.DataSourceRequest request) <0x2a2e2a8 + 0x0000a> in <b8e61d62238c4666b5ff65df7544c779>:0
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM:   at Telerik.DataSource.Extensions.QueryableExtensions.ToDataSourceResult (System.Collections.IEnumerable enumerable, Telerik.DataSource.DataSourceRequest request) <0x2a2d980 + 0x0000e> in <b8e61d62238c4666b5ff65df7544c779>:0
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM:   at Telerik.Blazor.Data.TelerikDataSource.ProcessData (System.Collections.IEnumerable data) <0x2a2d850 + 0x0000a> in <a910a49758ca4acf83cce1dc84471cb6>:0
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM:   at Telerik.Blazor.Components.TelerikGridBase`1[TItem].ProcessDataInternal () <0x2a2d590 + 0x0001c> in <a910a49758ca4acf83cce1dc84471cb6>:0
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM:   at Telerik.Blazor.Components.TelerikGridBase`1[TItem].ProcessData () <0x2a72220 + 0x00156> in <a910a49758ca4acf83cce1dc84471cb6>:0
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM:   at Telerik.Blazor.Components.TelerikGridBase`1[TItem].OnSort (Telerik.Blazor.Components.Grid.IGridHeader header) <0x2a71000 + 0x00104> in <a910a49758ca4acf83cce1dc84471cb6>:0
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM:   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion (System.Threading.Tasks.Task task) <0x25a24e8 + 0x000e6> in <cbf249d7f04d4fa18d15bfae8ef7f389>:0
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM:   at Telerik.Blazor.Components.Grid.GridHeaderRowBase`1[TItem].OnHeaderSort (Telerik.Blazor.Components.Grid.IGridHeader header) <0x2d06328 + 0x0014a> in <a910a49758ca4acf83cce1dc84471cb6>:0
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM:   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion (System.Threading.Tasks.Task task) <0x25a24e8 + 0x000e6> in <cbf249d7f04d4fa18d15bfae8ef7f389>:0
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM:   at Telerik.Blazor.Components.Grid.GridHeaderBase`1[TItem].ToggleSort () <0x2d05308 + 0x00100> in <a910a49758ca4acf83cce1dc84471cb6>:0
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM:   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion (System.Threading.Tasks.Task task) <0x25a24e8 + 0x000e6> in <cbf249d7f04d4fa18d15bfae8ef7f389>:0
h.printErr @ blazor.webassembly.js:1
blazor.webassembly.js:1 WASM:   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask (System.Threading.Tasks.Task taskToHandle) <0x25a9440 + 0x000c2> in <cbf249d7f04d4fa18d15bfae8ef7f389>:0
h.printErr @ blazor.webassembly.js:1
Marin Bratanov
Telerik team
 answered on 09 Jan 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?