Telerik Forums
UI for Blazor Forum
2 answers
88 views

Hi I would like something similar to the search in bootstrap doc where you can type CTRL+/ to set focus in the search field.

Are there any components/utils I can use in the Telerik Blazor lib?

 

Found this jsakamoto/Toolbelt.Blazor.HotKeys: This is a class library that provides configuration-centric keyboard shortcuts for your Blazor WebAssembly (client-side) apps. (github.com)

Martin Herløv
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 07 Dec 2021
2 answers
939 views

Is there a way to force tabs to wrap when there are more tabs than there is space in a horizontal viewport?  I am running into an issue where too many tabs get generated and they end up rendering outside the viewport causing the user to have to scroll.  

The idea is to render something like this.

[Tab 1] [Tab 2] [Tab 3] [Tab 4] [Tab 5] [Tab 6] [Tab 7] [Tab 8]
[Tab 9] [Tab 10]

Dimo
Telerik team
 answered on 06 Dec 2021
1 answer
1.2K+ views

Hi,

I used the following solution: https://docs.telerik.com/blazor-ui/knowledge-base/grid-dynamic-column-template for easier reusability in a grid. I want to do the same for the TelerikForm. However, the Template property of FormItem is of type RenderFragment instead of RenderFragment<object>. Because of this, I'm getting an error (see title). I cannot change the return type of the function to RenderFragment either, because then I get the following error on the line that says "return ColumnTemplate": Expected a method with 'void FormTemplate(RenderTreeBuilder)' signature.

Is there any way to resolve this?

Svetoslav Dimitrov
Telerik team
 answered on 06 Dec 2021
1 answer
2.2K+ views

Hi,

I have modal popup and I need to add Textbox Focus in first field in the window on loading.

 

 

Thanks,

Vishnu Vardhanan

Apostolos
Telerik team
 answered on 06 Dec 2021
1 answer
194 views

Hi,

 

In your roadmap you mention a map component. Can you give me a rough idea of when this will be available please?

 

thanks,

 

Rob

Marin Bratanov
Telerik team
 answered on 05 Dec 2021
1 answer
431 views

Hi

I have TelerikTreeView control, When I do Expand and collapse 'arrow' should not display , since there is no child element.

Could you please help on this ASAP.

Please find the attachment

 

Thanks,

Vishnu Vardhanan

Marin Bratanov
Telerik team
 answered on 05 Dec 2021
1 answer
1.1K+ views

I'm trying to make the "Render Blazor Components From Your JavaScript Code" section of the blog, Final Blazor Improvements Before .NET 6 (telerik.com),  work with a Blazor application that includes Telerik components.

I created a  "Telerik C# Blazor Application" template, with .NET6, Hosting Model Server, Target Framework .NET 6.0, CRUD template. (Attached).

There's a htmlcounter.html page that works great, I can render the Counter in javascript and it functions correctly.

When I try with htmlgrid.html, I get the following error. I've tried referencing telerik-blazor.js, but can't get that to satisfy the render. 

How do I configure a TelerikRootComponent for this Javascript rendered page?

Error: System.Exception: A Telerik component on the requested view requires a TelerikRootComponent to be added to the root of the MainLayout component of the app. Read more at: https://docs.telerik.com/blazor-ui/getting-started/what-you-need#project-configuration
   at Telerik.Blazor.Components.RootComponent.TelerikRootComponentFragment.OnInitializedAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
log @ blazor.server.js:1

 

Dimo
Telerik team
 answered on 03 Dec 2021
1 answer
108 views

When clicking the header of a sortable column, it toggles between ascending, descending and no sort order.
How to make it always have a sort order, i.e. only toggle between ascending and descending?

Hristian Stefanov
Telerik team
 answered on 03 Dec 2021
1 answer
241 views

I want to capture keys to implement short cut commands. I wrap the TelerikWindow in a <div @onkeyup> but the handler doesn't get called. Works if the TelerikWindow is removed. This is the Blazor test page

@page "/test"
<div @onkeyup="HandleKeyUp"
    tabindex="0"
    @ref="testRef">
    @KeyPressed
<TelerikWindow Visible="true"
               Width="1200px"
>
    <WindowTitle>
        <strong>Wager Coverage</strong>
    </WindowTitle>
    <WindowActions>
        <WindowAction Name="Minimize"></WindowAction>
        <WindowAction Name="Maximize"></WindowAction>
        <WindowAction Name="Close"></WindowAction>
    </WindowActions>
    <WindowContent>
<TelerikGrid Data="@MyData" Height="400px"
             Pageable="true" Sortable="true" Groupable="true"
             FilterMode="Telerik.Blazor.GridFilterMode.FilterRow"
             Resizable="true" Reorderable="true">
    <GridColumns>
        <GridColumn Field="@(nameof(SampleData.Id))" Width="120px" />
        <GridColumn Field="@(nameof(SampleData.Name))" Title="Employee Name" Groupable="false" />
        <GridColumn Field="@(nameof(SampleData.Team))" Title="Team" />
        <GridColumn Field="@(nameof(SampleData.HireDate))" Title="Hire Date" />
    </GridColumns>
</TelerikGrid>
</WindowContent>
</TelerikWindow>
</div>
@code {
    public string inputtext { get; set; }
    string KeyPressed;
    void HandleKeyUp(KeyboardEventArgs e)
    {
        KeyPressed = e.Key;
    }

    private ElementReference testRef;
    [Inject] IJSRuntime JSRuntime { get; set; }

    protected override async Task OnAfterRenderAsync(bool firstRender)
    {
        if (firstRender)
        {
            await JSRuntime.InvokeVoidAsync("SetFocusToElement", testRef);
            //await testRef.FocusAsync();
        }
    }

    public IEnumerable<SampleData> MyData = Enumerable.Range(1, 30).Select(x => new SampleData
    {
        Id = x,
        Name = "name " + x,
        Team = "team " + x % 5,
        HireDate = DateTime.Now.AddDays(-x).Date
    });

    public class SampleData
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Team { get; set; }
        public DateTime HireDate { get; set; }
    }

}
Dimo
Telerik team
 answered on 03 Dec 2021
1 answer
186 views

I have a ComboBox or a DropDownList that gets data from a remote service, using virtualization. When the PageSize property is big enough (in my case 20), I have issues scrolling up the selection box drop down list, it tries to scroll but then resets to the current selected item making it almost imposible to scroll up. You can use your own demo examples to replicate this issue.

To reproduce the issue, try the ComboBox - Virtualization, in Telerik REPL (Demo), change the PageSize from 10 to 20. Then open the combo box, scroll a couple of pages down and select a value. Reopen the combo and try to scroll (with mouse wheel) upwards, it will return to the selected value and will not allow you to reach the top of the item list.

Hristian Stefanov
Telerik team
 answered on 02 Dec 2021
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?