Telerik Forums
UI for Blazor Forum
1 answer
208 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
146 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
2.1K+ 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
310 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
387 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
231 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.5K+ 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
259 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
229 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
157 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?