Telerik Forums
UI for Blazor Forum
1 answer
139 views

If the children property is not null then the expand children arrow will display.

It displays even if the children is an empty array.

This may be a feature but seems more like a bug to me.

<TelerikMenu Data="@MenuItems" Orientation="MenuOrientation.Vertical"
             UrlField="@nameof(MenuItem.Url)"                
             ItemsField="@nameof(MenuItem.Children)"
             TextField="@nameof(MenuItem.Text)"
             ImageUrlField="@nameof(MenuItem.Image)">
</TelerikMenu>

public class MenuItem
{
    public string Text { get; set; } = "";
    public string Url { get; set; } = "";
    public string Image { get; set; } = "";
    public MenuItem[] Children { get; set; } // Arrow will show on all items if: = Array.Empty<MenuItem>();
}
Marin Bratanov
Telerik team
 answered on 07 Oct 2019
5 answers
1.8K+ views

Hi,

Is a PDf Viewer on the roadmap for the Blazor SDK?

If so will a thumbnail viewer be included?

 

Regards,

Graham

Marin Bratanov
Telerik team
 answered on 06 Oct 2019
1 answer
532 views

Hello, can you add support for the "title" attribute on the button component.    It has already been requested for Kendo for Angular 2+. We would like to have this feature in Blazor as well.  https://feedback.telerik.com/kendo-angular-ui/1360816-toolbar-button-title-attribute

Thanks,

Ryan

Marin Bratanov
Telerik team
 answered on 04 Oct 2019
3 answers
283 views

Will the Grid have an update to group within the code like what we can do in Asp.Net Core?

I have also noticed that we cannot hide columns, just not rendered.  I have hidden columns here to change the Grouping headers.

Example: (The grouping starts with line 19, which works in Asp.NET core)

01.@(Html.Kendo().Grid<Scenario>(Model.Scenarios)
02.                .Name("scenarios")
03.                .Columns(col =>
04.                {
05.                    col.Bound(c => c.Task.CodeYear).ClientGroupHeaderTemplate("Survey: #= data.value#").Hidden(true);
06.                    col.Bound(c => c.Task.Site.Alias).ClientGroupHeaderTemplate("Site: #= data.value#").Hidden(true);
07.                    col.Bound(c => c.ReferenceCode).ClientGroupHeaderTemplate("Scenario No: #= data.value#").Hidden(true);
08. 
09.                    col.Bound(c => c.Level).ClientTemplate("<a href='" + Url.Content($"/Foundation/Scenarios/Details?id=") + "#= ScenarioId#'><div data-toggle=\"popover\" title=\"#=Level.TypeName# \" data-content=\"#=Level.Description#\">#=Level.ShortName#<span class=\"glyphicon glyphicon-info-sign\"></span></div>").Width(100);
10. 
11.                    col.Bound(c => c.Risk).Width(150);
12. 
13.                    col.Bound(c => c.BusinessInterruption).Title("BI").ClientTemplate("#=BusinessInterruption# <a href=\"\\#\" data-toggle=\"popover\" title=\"#=BusinessInterruption#\" data-content=\"#=BIComments#\"><span class=\"glyphicon glyphicon-info-sign\"></span></a>");
14.                    col.Bound(c => c.Workaround).Title("Workaround").ClientTemplate("#=Workaround# <a href=\"\\#\" data-toggle=\"popover\" title=\"#=Workaround#\" data-content=\"#=WorkaroundComments#\"><span class=\"glyphicon glyphicon-info-sign\"></span></a>");
15.                    col.Bound(c => c.MaterialDamage).Title("Material Damage").ClientTemplate("#=MaterialDamage# <a href=\"\\#\" data-toggle=\"popover\" title=\"#=MaterialDamage#\" data-content=\"#=MaterialDamageComments#\"><span class=\"glyphicon glyphicon-info-sign\"></span></a>");
16.                })
17.                .DataSource(ds =>
18.                            ds.Ajax()
19.                            .Group(group =>
20.                            {
21.                                group.Add(g => g.Task.CodeYear);
22.                                group.Add(g => g.Task.Site.Alias);
23.                                group.Add(g => g.ReferenceCode);
24.                            })
25.                )
26.                .Scrollable()
27.            )
Marin Bratanov
Telerik team
 answered on 04 Oct 2019
1 answer
192 views

I am confused about your demos.  Why do you not use the Telerik Blazor components as much as possible.  For instance, if you look at the window demo, the only Telerik compenents I see is the TelerkWindow and items directly related to it.  For textboxes and labels, you go back to standard HTML instead of using the your equivalent.  Do they not play well together, or is there some other reason you don't use them?

I am asking as an honest question.  I am just now getting into this stuff and trying to figure out where I am going wrong when I run into problems is a pain.  For instance, This code ends up showing nothing.  When I inspect it, it is one the page with dimensions of 0x17.  I don't know if it is because of something I've done wrong with the WIndow, the textboxes, or if it is something else.

 

@page
@model LoginModel
<TelerikWindow Visible="True" Centered="true" Height="400" Width="400" >
  <WindowContent>
    <telerikTextBox Label="Username:"  />
    <br />
    <br />
    <telerikTextBox Label="Password:"  />
  </WindowContent>
</TelerikWindow>
 
@section Scripts {
    <partial name="_ValidationScriptsPartial" />
}
Marin Bratanov
Telerik team
 answered on 04 Oct 2019
4 answers
475 views

Hi,

I get this error when I try to filter a string readonly property:

Eccezione generata: 'System.InvalidOperationException' in Microsoft.EntityFrameworkCore.dll
Eccezione generata: 'System.InvalidOperationException' in System.Private.CoreLib.dll
Eccezione generata: 'System.InvalidOperationException' in System.Private.CoreLib.dll
Eccezione generata: 'System.InvalidOperationException' in System.Private.CoreLib.dll
Eccezione generata: 'System.InvalidOperationException' in System.Private.CoreLib.dll
Eccezione generata: 'System.InvalidOperationException' in Microsoft.AspNetCore.Components.dll
Eccezione generata: 'System.InvalidOperationException' in System.Private.CoreLib.dll
Eccezione generata: 'System.InvalidOperationException' in System.Private.CoreLib.dll
Eccezione generata: 'System.InvalidOperationException' in System.Private.CoreLib.dll
Eccezione generata: 'System.InvalidOperationException' in Microsoft.AspNetCore.Components.dll
Eccezione generata: 'System.InvalidOperationException' in System.Private.CoreLib.dll
Eccezione generata: 'System.InvalidOperationException' in System.Private.CoreLib.dll
Eccezione generata: 'System.InvalidOperationException' in System.Private.CoreLib.dll
Eccezione generata: 'System.InvalidOperationException' in System.Private.CoreLib.dll
Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost: Error: Unhandled exception in circuit 'Dc6XDD5v9mxLyyypeL63oqa9jPGzD6bu1FJDHIMCCt4'.

System.InvalidOperationException: The LINQ expression 'Where<Card>(
    source: OrderByDescending<Card, Nullable<DateTime>>(
        source: Where<Card>(
            source: DbSet<Card>, 
            predicate: (c) => (Unhandled parameter: __pngruppo_0).Contains(c.IdAccessPoint) && c.Stato.Value == 1), 
        keySelector: (c) => c.DataInserimento), 
    predicate: (c) => c.Cognome.ToLower().Contains("t"))' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
   at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.<VisitMethodCall>g__CheckTranslated|8_0(ShapedQueryExpression translated, <>c__DisplayClass8_0& )
   at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
   at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
   at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
   at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression)
   at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query)
   at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass9_0`1.<Execute>b__0()
   at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQueryCore[TFunc](Object cacheKey, Func`1 compiler)
   at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func`1 compiler)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
   at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression)
   at Telerik.DataSource.Extensions.QueryableExtensions.Count(IQueryable source)
   at Telerik.DataSource.Extensions.QueryableExtensions.CreateDataSourceResult[TModel,TResult](IQueryable queryable, DataSourceRequest request, Func`2 selector)
   at Telerik.DataSource.Extensions.QueryableExtensions.ToDataSourceResult(IQueryable queryable, DataSourceRequest request)
   at Telerik.DataSource.Extensions.QueryableExtensions.<>c__DisplayClass3_0.<ToDataSourceResultAsync>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location where exception was thrown ---
   at Bipoint.Data.Model.BipointService.GetCards_Inseriti_PN(DataSourceRequest request) in C:\Users\francesco\Documents\myprojects\2Next\Projects\Bipoint\prove\BipointB\Data\Model\BipointService.cs:line 31
   at Bipoint.Pages.Pn.ReadItems(GridReadEventArgs args) in C:\Users\francesco\Documents\myprojects\2Next\Projects\Bipoint\prove\BipointB\Pages\Pn.razor:line 62
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Telerik.Blazor.Components.TelerikGridBase`1.ProcessData()
   at Telerik.Blazor.Components.TelerikGridBase`1.OnFilterChange(FilterDescriptorBase filter)
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Telerik.Blazor.Components.Grid.GridFilterHeaderBase`1.Filter(FilterDescriptor filterDescriptor)
   at Telerik.Blazor.Components.Grid.GridFilterHeaderBase`1.OnValueChanged(Object newValue)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_0(Object state)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource`1 completion, SendOrPostCallback d, Object state)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<>c.<.cctor>b__23_0(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)
Eccezione generata: 'System.InvalidOperationException' in Microsoft.AspNetCore.Components.Server.dll
Eccezione generata: 'System.InvalidOperationException' in Microsoft.JSInterop.dll
Eccezione generata: 'System.InvalidOperationException' in Microsoft.AspNetCore.Components.Server.dll
Eccezione generata: 'System.InvalidOperationException' in Microsoft.JSInterop.dll
Eccezione generata: 'System.InvalidOperationException' in Microsoft.AspNetCore.Components.Server.dll
Eccezione generata: 'System.InvalidOperationException' in Microsoft.JSInterop.dll
Eccezione generata: 'System.InvalidOperationException' in Microsoft.AspNetCore.Components.Server.dll
Eccezione generata: 'System.InvalidOperationException' in Microsoft.JSInterop.dll
Microsoft.AspNetCore.Routing.EndpointMiddleware: Information: Executed endpoint '/_blazor'
Eccezione generata: 'System.InvalidOperationException' in Microsoft.AspNetCore.Components.Server.dll
Microsoft.AspNetCore.Hosting.Diagnostics: Information: Request finished in 17300.942ms 101 
Eccezione generata: 'System.InvalidOperationException' in Microsoft.JSInterop.dll

 

this is the grid definition:

 

 <TelerikGrid Data="@Inseriti" Height="100%" Class="fill-height"
                         Pageable="true" Sortable="true" Groupable="true"
                         PageSize=25 TotalCount="@Total"
                         OnRead=@ReadItems
                         FilterMode="Telerik.Blazor.GridFilterMode.FilterRow">
                <GridColumns>
                    <GridColumn Field="@(nameof(Card.Numero))" Title="Barcode" />
                    <GridColumn Field="@(nameof(Card.Cognome))" Title="Cognome" Groupable="false"/>
                </GridColumns>
            </TelerikGrid>

 

the Card is a EF class:

 public partial class Card
    {

      public int IdCard { get; set; }
        public int IdPatient { get; set; }

 

Marin Bratanov
Telerik team
 answered on 03 Oct 2019
1 answer
225 views

Greetings!

I'm trying to replicate your docs' sidenav with a Treeview component.
I was trying to overwrite the category template via Treeview Templates, but i can only overwrite the item container, not the complete node.
My idea was to overwrite the root category node to alter the expand icon, ... your sidenav opens child nodes with a click on the root node.

Does anybody has an idea? ...

Niklas

Marin Bratanov
Telerik team
 answered on 02 Oct 2019
3 answers
368 views

I'm using a state container to basically one-way bind the data to the state container (see https://www.youtube.com/watch?v=KlPaM0yWWbQ).  I cannot use to CascadingParameter because the code would trigger unnecessary UI updates, so State Container serves my purposes perfectly.  Generally, the blazor code w/ the Grid is:

        <TelerikGrid Data="@Elements"  Sortable="true" FilterMode="Telerik.Blazor.GridFilterMode.FilterRow">
            <GridColumns>
                <GridColumn Field="@(nameof(ClaimObject.Text))" Title="Text" />
            </GridColumns>
        </TelerikGrid>

@code {

    protected override void OnInitialized()
    {
        AppState.StateChanged += OnClaimStateChange;
    }

    public List<ClaimObject> Elements => AppState.GetElements();

    void OnClaimStateChange(object sender, EventArgs e) => StateHasChanged();

}

When the first ClaimObject is added, the grid refreshes.  However, adding any subsequent ClaimObjects does not update the UI.  

Conversely, the following code updates every time:

        foreach (var element in Elements)
        {
            <div>@element.Text</div>
        }

Both Grid and TreeView are updating working this way.  Any suggestions to get the grid to refresh when the State Container updates the data?

 

 

Marin Bratanov
Telerik team
 answered on 01 Oct 2019
3 answers
66 views

Hello,

why the demo site is so slow and full of bugs ( duplicated menu, none drop down not working on Firefox , strange side menu behavior on drop down, grid filter menu icon no hand on mouse over... ) .

Can we expect the same in implementation?

 

Tino.

Marin Bratanov
Telerik team
 answered on 30 Sep 2019
7 answers
210 views

Hi

I have created a brand new Blazor Server project .NET Core 3.0 (released version) and added Telerik.UI.for.Blazor 2.1.0. When I go to publish the app (Self-contained to a folder) it fails.

There are numerous errors that relate to "package downgrade detected xxx from 4.3.0 to 4.0.1"

Is this a known issue?

 

Here's an example of one of the errors:

SeverityCodeDescriptionProjectFileLineSuppression State
ErrorDetected package downgrade: System.IO.FileSystem.Primitives from 4.3.0 to 4.0.1. Reference the package directly from the project to select a different version.

Marin Bratanov
Telerik team
 answered on 30 Sep 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?