Telerik Forums
UI for Blazor Forum
1 answer
413 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
235 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
179 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
3 answers
329 views

In my project, the turn has finally come to the implementation of the Gantt diagram.
I looked with envy at the component from Syncfusion, but stubbornly did not allow myself to combine components from different developers, I try to be loyal only to Telerik.
The long-awaited release of the component and - a huge disappointment!
Guys, this is not a product that you are not ashamed to release for release.
It's more like "make them at least something to be."
Where are the templates for rows, headings? What is this totally inappropriate editing? What the hell is a double click to edit? Where is the managed expand \ collapse? Where is the state management? Where is the slider position management? Do you think it's okay to leave so much blank space where there are no tasks in the "year" view? Specifying the "RangeStart" property for the GanttYearView does not affect the display in any way - all the months of the year will still be displayed.

You didn't even bother to include a description of properties for localization!
Take the Syncfusion component as a reference and do it with all your heart as you can, like your Grid. So far - a complete failure.

Ivan
Top achievements
Rank 3
Iron
Iron
Iron
 updated answer on 02 Dec 2021
1 answer
237 views

Hello, Excuse the bad English

 

There is a telerik grid on the razor page. I want to reload the telerik grid whenever the parameter value changes that has changed the this razor file.

I tried reloading sourcedata using OnParametersSetAsync() method, but I didn't reload ReadItems() which is running on OnRead event.

How do I reload the Read Items() method?


HYOKYEONG
Top achievements
Rank 1
Iron
 updated question on 01 Dec 2021
0 answers
1.1K+ views

I am calling the razor component in TabStrip. If the value of the parameter changes, I want to reload the razor component with that value.

As of now, the razor component is called only when the div is empty, that is, when the razor component is not called, and in other situations, it is not reloaded.

I want to call the razor component using the changed data through an event. In other words, it is hoped that the contents of the razor component have changed immediately.

What should I do?


HYOKYEONG
Top achievements
Rank 1
Iron
 updated question on 01 Dec 2021
1 answer
136 views
For example, I want the items in the upper left cell to be horizontal centered. But I want the items in the upper right cell to be horizontal aligned left. Is something like this possible without using custom css?
Marin Bratanov
Telerik team
 answered on 01 Dec 2021
1 answer
605 views

When adding the Telerik theme to my existing dotnet 6 Blazor Server app, should I remove the .css files that come with that template? Here is what my HEAD looks like right now.


<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <base href="~/" />
    
    <!--CSS-->
    <link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
    <link href="css/site.css" rel="stylesheet" />
    <link href="Portal.styles.css" rel="stylesheet" />
    <link rel="stylesheet" href="_content/Telerik.UI.for.Blazor/css/kendo-theme-default/all.css" />
    
    <!--JS-->
    <script src="_content/Telerik.UI.for.Blazor/js/telerik-blazor.js" defer></script>
    
    <component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
    
</head>
Should I remove the top 3 .css lines under the CSS section and leave only the Telerik theme? 
Apostolos
Telerik team
 answered on 01 Dec 2021
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?