Telerik Forums
UI for Blazor Forum
1 answer
1.9K+ views
I got this error in browser
Error: One or more errors occurred. (Root component type 'BlazorCRUD.Components.Pages.Home' could not be found in the assembly 'BlazorCRUD'.)
    at Jn (marshal-to-js.ts:349:18)
    at Ul (marshal-to-js.ts:306:28)
    at 00b1ee2e:0x1facb
    at 00b1ee2e:0x1bf8c
    at 00b1ee2e:0xf173
    at 00b1ee2e:0x1e7e5
    at 00b1ee2e:0x1efdb
    at 00b1ee2e:0xcfed
    at 00b1ee2e:0x44108
    at e.<computed> (cwraps.ts:338:24)

in my code home.razor
@page "/"
@attribute [StreamRendering]
@inject IDateServices DateServices
@rendermode InteractiveAuto

<PageTitle>Home</PageTitle>

<h1>Hello, world!</h1>

Welcome to your new app.

<br />

<TelerikButton OnClick="@SayHelloHandler" ThemeColor="primary">Say Hello</TelerikButton>

<br />

@helloString

<br />

@if (dates.Count == 0)
{
    <span>Loading.....</span>
}
else if (dates.Count != 0)
{
        <TelerikGrid Data="@dates"
                     Pageable="true"
                     Sortable="true"
                     FilterMode="@GridFilterMode.FilterRow">
            <GridColumns>
                <GridColumn Field="BOOKING_DATE" Title="Booking Date" />
            </GridColumns>
        </TelerikGrid>
}
else
{
    <span>No Data</span>
}

<Notes PageInteractivity="static" AppInteractivity="static" />

@code {
    MarkupString helloString;

    void SayHelloHandler()
    {
        string msg = string.Format("Hello from <strong>Telerik Blazor</strong> at {0}.<br /> Now you can use C# to write front-end!", DateTime.Now);
        helloString = new MarkupString(msg);
    }
    List<TABELDAYS31TEST> dates = new List<TABELDAYS31TEST>();
    private List<Product> GridData { get; set; }


    protected override async Task OnInitializedAsync()
    {
        await Task.Delay(1000);

        GridData = new List<Product>();
        dates = await DateServices.GetAllDate();

        var rnd = new Random();

        for (int i = 1; i <= 30; i++)
        {
            GridData.Add(new Product
            {
                Id = i,
                Name = "Product name " + i,
                Price = (decimal)(rnd.Next(1, 50) * 3.14),
                Released = DateTime.Now.AddDays(-rnd.Next(1, 365)).AddYears(-rnd.Next(1, 10)).Date,
                Discontinued = i % 5 == 0
            });

        }
    }

    // protected override void OnInitialized()
    // {
    //     GridData = new List<Product>();

    //     var rnd = new Random();

    //     for (int i = 1; i <= 30; i++)
    //     {
    //         GridData.Add(new Product
    //             {
    //                 Id = i,
    //                 Name = "Product name " + i,
    //                 Price = (decimal)(rnd.Next(1, 50) * 3.14),
    //                 Released = DateTime.Now.AddDays(-rnd.Next(1, 365)).AddYears(-rnd.Next(1, 10)).Date,
    //                 Discontinued = i % 5 == 0
    //             });

    //     }

    //     base.OnInitialized();
    // }

    public class Product
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public decimal Price { get; set; }
        public DateTime Released { get; set; }
        public bool Discontinued { get; set; }
    }
}

can someone help for this error, thanks.
Dimo
Telerik team
 answered on 02 Feb 2024
1 answer
250 views

It seems this documentation isn't correct:

Blazor Predefined Dialogs - Alert, Confirm, Prompt - Telerik UI for Blazor

When I create the following dialog it seems to be missing 2 overloads:

bool isDeactivate = await Dialogs.ConfirmAsync($"Deactivate the {ContextLink.Name} {Title}?", "Deactivate Record?", "Yes", "No");

I get this error:

Severity	Code	Description	Project	File	Line	Suppression State
Error	CS1501	No overload for method 'ConfirmAsync' takes 4 arguments	Gsi.Cloud.Maintenance.Rebuild	C:\GSI Cloud\Dev\Gsi.Cloud.Maintenance\Gsi.Cloud.Maintenance.Rebuild\Components\ContextLinks\Details.razor.cs	195	Active

When I chop out the "yes", "no" parameters then no error.  It'd be nice to have the option to set those values as advertised in the documentation... but, its not there.

Hristian Stefanov
Telerik team
 answered on 02 Feb 2024
1 answer
319 views

Hi, 

Recently, I just updated my Blazor project to .NET8 and facing the following issue every time rendering Telerik Components. 

This issue doesn't appear when using .NET7 and Telerik Blazor UI 5.0.1. 

Please let me know if you have been facing this issue before.

My current packages:

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="8.0.1" />
<PackageReference Include="Microsoft.CodeAnalysis" Version="4.8.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Telerik.DataSource" Version="3.0.0" />
<PackageReference Include="Telerik.Documents.Core" Version="2023.3.1106" />
<PackageReference Include="Telerik.Documents.SpreadsheetStreaming" Version="2023.3.1106" />
<PackageReference Include="Telerik.Recurrence" Version="0.2.1" />
<PackageReference Include="Telerik.UI.for.AspNet.Core" Version="2023.2.718" />
<PackageReference Include="Telerik.UI.for.Blazor" Version="5.0.1" />
<PackageReference Include="Telerik.Zip" Version="2023.3.1106" />
</ItemGroup>



 

Dimo
Telerik team
 answered on 02 Feb 2024
2 answers
125 views

Hi,

Using the editor, is it possible to combine the built-in tools and the custom ones?

I would like to use the Tools="EditorToolSets.All" as well as the @ToolCollection that I created at the same time.

Regards,

Omar

Omar
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 01 Feb 2024
7 answers
1.3K+ views
The demo's only supply a few .resx files. I am sure there are more of them, but I am unable to find them, neither in the Account download page, nor in the docs, or mentioned in the forums.
insomnia
Top achievements
Rank 2
Iron
 updated answer on 01 Feb 2024
1 answer
181 views

Hello,

I'm attempting to add an image to the editor from a different domain. When I insert an image hosted on another domain, it doesn't display (refer to image1). However, if I insert an image hosted on the same wwwroot, it does display (refer to image2).

Is this the intended design?

Regards,
Omar

Omar
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 31 Jan 2024
1 answer
165 views

Hi,

Is there a simple example of how to implement the File manager?

Is there a working example that we can download?

Regards,

Omar

Dimo
Telerik team
 updated answer on 31 Jan 2024
0 answers
103 views

Hi,

since not all ARIA attributes are supported, I have to set some attributes manually. Setting aria-required (e.g. for textbox controls) by JavaScript is working:

function activateRequired(targetControlId) {
    if (targetControlId) {
        field = document.getElementById(targetControlId);
        if (field) {
            field.setAttribute("aria-required", "true");
        }
    }
}

Now I have to set aria-hidden for the internal button of combobox.

Is it possible to get this button to set the attribute?

Regards, Stefan

Stefan
Top achievements
Rank 1
Veteran
Iron
 asked on 30 Jan 2024
1 answer
522 views

Hi,

Any way to have an event callback when clicking a row in the TelerikGrid with middle mouse button?
Looks like the OnRowClick event is only triggered when using left mouse button.

KR,

Lennert

Hristian Stefanov
Telerik team
 answered on 30 Jan 2024
1 answer
122 views

We're using a TelerikGrid with Row Drag & Drop and Hierarchy, which generate icon columns in the grid as shown below. Column 1 for drag & drop, column 2 for the hierarchy expansion.

However, we'd like to change the order of these columns around, for example we'd like to put a checkbox column in as the first column.

Is this possible?

Dimo
Telerik team
 answered on 29 Jan 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?