Telerik Forums
UI for Blazor Forum
1 answer
557 views

Hi,

This seems to effect most telerik components, but if for example using a TelerikCheckBox and the ValueChanged event is an async function, then the error boundry wont catch the exception. This works from basic checkboxes or if not using async.

Example:

<div>
    Telerik checkbox (does NOT display any error): <TelerikCheckBox TValue="bool" ValueChanged="@OnCheck" />
</div>

<div>
    Basic checkbox (displays the error): <input type="checkbox" @onchange="@OnCheck" />
</div>

@{
    async Task OnCheck()
    {
        throw new Exception("Something went wrong!");
    }
}

MainLayout:

<ErrorBoundary>
    <ChildContent>
        <div class="page">
            <div class="sidebar">
                <NavMenu />
            </div>

            <main>
                <div class="top-row px-4">
                    <a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
                </div>

                <article class="content px-4">
                    <TelerikRootComponent>
                        @Body
                    </TelerikRootComponent>
                </article>
            </main>
        </div>
    </ChildContent>
    <ErrorContent>
        ERROR!!!
    </ErrorContent>
</ErrorBoundary>

Dimo
Telerik team
 answered on 14 Feb 2024
1 answer
327 views

Hello,

I'm a newcomer to Telerik, and I'd appreciate it if you could assist me without suggesting that the documentation is clear enough.

Is there an uncomplicated method to enable resizing for the Editor, similar to the one used in your forum's editor?

I'm concurrently working with Syncfusion controls, and I've been able to implement a resizable editor easily using the code provided below with their control. 

How can I achieve the same functionality with your control?

Regards,

Omar

@using Syncfusion.Blazor.RichTextEditor
<div class="control-section resize">
    <SfRichTextEditor EnableResize="true" Height="250px">
        <p>
            The Rich Text Editor component is a WYSIWYG ("what you see is what you get") editor that provides the best user experience to create and update the content.
            Users can format their content using standard toolbar commands.
        </p>
    </SfRichTextEditor>
</div>
<style>
    .e-richtexteditor {
        max-width: 880px;
        min-width: 200px;
        min-height: 170px;
        max-height: 400px;
    }
    .control-section.resize .e-popup.e-popup-open.e-dialog {
        max-height: 410px !important;
    }
</style>

Omar
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 06 Feb 2024
1 answer
147 views

We modified the code in the InCell Editing demo (Blazor Components Demos and Examples - Telerik UI for Blazor) with the Telerik REPL tool to include an EditorTemplate for the UnitPrice column. If we type in the column quickly and press tab to exit the field the input is cutoff.  ie; we type 155 and the value shown in the grid after the update is 15.  We have recorded a video showing the problem but we are unable to upload here.  

In our own sample application that we built to isolate the problem we saw the same behavior with TelerikTextBoxes and TelerikNumericTextBoxes.

Is this a known problem with a known solution? 

The code used for the EditorTemplate

        <GridColumn Field=@nameof(ProductDto.UnitPriceDisplayFormat="{0:C}" Title="Unit Price" Width="150px" >

            <EditorTemplate>
            @{
            var item = context as ProductDto;
            if (item != null)
            {
                <TelerikNumericTextBox @bind-Value="@item.UnitPrice"/>
            }
            }
            </EditorTemplate>
        </GridColumn>
Hristian Stefanov
Telerik team
 answered on 05 Feb 2024
1 answer
83 views

I am trying to create dropdowns in my filter and I see there is an item that is currently unscheduled but am looking for a solution I can implement now
Unplanned feature

looking at the TelerikEnumEditor I see that the enums are doing exactly what I need but I need to change the Data Dictionary<int,string> to my own data. 

I have found a way to overwrite the GetEnumData function but it's not passing the information it's altering it within the class, Is there a way for me to access the Data member of the component when I am defining my filter fields or pass it along with it?

or are there other alternatives I have missed?

Thanks

Matt

Svetoslav Dimitrov
Telerik team
 answered on 05 Feb 2024
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
241 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
311 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
121 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
164 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?