Telerik Forums
UI for Blazor Forum
1 answer
1.2K+ views

Hi everyone,

By setting the property Expanded equal to true in the collection the treeview does not expand anymore. This was working before but now, it doesn't.

To explain you more precisely what I have done: in the model I have the property Expanded. On double click on the node (not on the arrow in front of the node) I'am am setting the Expanded property to true if the node is closed or if the node is opened I'm setting the Expanded property to false. This was working before, but now it doesn't. Have you changed something for this component?

How can I fix this issue? Can you help me please?

 

Best regards,

Cipri

Marin Bratanov
Telerik team
 answered on 09 Dec 2020
1 answer
473 views
In the WASM Blazor app I'm working on, there is a centralized/global unhandled-exception handler that we leverage in order to avoid having to try/catch all over the place. For some reason, the Grid's `OnRead` event/handler seems to be swallowing exceptions, thus circumventing the aforementioned centralized handler.

Here is an example, using the bog-standard Blazor WASM template that demonstrates what I mean. Any suggestions on what to try to have exceptions that may occur in OnRead to bubble-up like everything else is? Thanks in advance.

@page "/fetchdata"
@using BlazorUnhandled.Shared
@inject HttpClient Http

    <TelerikGrid Data=@forecasts AutoGenerateColumns="true" OnRead="@GridOnRead">
        
    </TelerikGrid>
@code {
    private WeatherForecast[] forecasts;

    protected override async Task OnInitializedAsync()
    {
        // This (when uncommented) results in the expected behaviour of the Blazor error handler doing what it's supposed to
        //throw new Exception("bad thing from OnInitializedAsync");        
    }

    protected async Task GridOnRead(GridReadEventArgs args) {
        var results = await Http.GetFromJsonAsync<WeatherForecast[]>("WeatherForecast");
        // This does _NOT_ result in the expected behaviour of the Blazor error handler:
        throw new Exception("bad thing from GridOnRead");
        forecasts = results;
        StateHasChanged();
    }
}

Bozhidar
Telerik team
 answered on 09 Dec 2020
1 answer
1.2K+ views

Hi,

How we can clear the list of saved files from the upload control, after have used them, without refreshing the page?

 

Thanks

Marin Bratanov
Telerik team
 answered on 09 Dec 2020
1 answer
502 views

I have a grid and I want to pop up an animation container with content specific to a row when a button is clicked in that row.

How do I reference the correct animation container?  No matter which button I click, it always loads the last animation container.

I've set @ref="notesPopup" for the animation container in the grid template

 

In code:

TelerikAnimationContainer notesPopup;

async Task ToggleNotes()
{
await notesPopup.ToggleAsync();
}

 

I think the question is how do I dynamically set the @ref and reference it in code?

 

Thank you

Nadezhda Tacheva
Telerik team
 answered on 08 Dec 2020
2 answers
735 views

I'm new to Blazor with Telerik and i'm having trouble creating a "top-level" notification layout.

I'm using a Drawer for a menu and would like a top-level notification component at the same level or above this Drawer component.

I'm using this as an example: https://github.com/telerik/blazor-ui/tree/master/notification/single-instance-per-app

But when I try to implementation something similar I end up with multiple @Body fragments in my MainLayout as seen below and in turn the content is duplicated.

Although the cascading Notification stuff works nice :)
I figure I'm missing something basic perhaps about encapsulating these into Blazor components? or something related to layouts?
Thanks,
Ed
 
<TelerikRootComponent>
    <TelerikButton OnClick="@(() => DrawerRef.ToggleAsync())" Icon="@IconName.Menu"></TelerikButton>
    <img src="https://www.qat.com/wp-content/uploads/2015/03/qat-global-logo-s.png" align="middle" />
   
    <CultureChooser />

    <TelerikNotification @ref="@Notification.Instance"
                         HorizontalPosition="@NotificationHorizontalPosition.Right"
                         VerticalPosition="@NotificationVerticalPosition.Top"
                         Class="big-notification">
    </TelerikNotification>
    <CascadingValue IsFixed="true" Value="@Notification">
        <div class="content px-4">
            @Body
        </div>
    </CascadingValue>

    <TelerikDrawer @ref="@DrawerRef" Data="@NavigablePages" Expanded="@Expanded" MiniMode="true" Mode="@DrawerMode.Push"
                   SelectedItemChanged="((DrawerItem item) => SelectedItemChangedHandler(item))"
                   ExpandedChanged="((bool newValue) => ExpandedChangedHandler(newValue))">
        <Content>
            @Body
        </Content>
    </TelerikDrawer>

</TelerikRootComponent>

Nadezhda Tacheva
Telerik team
 answered on 08 Dec 2020
1 answer
443 views
I would be nice if the Notification component would just render in the location where it was put by default.  Very strange that it doesn't.
Nadezhda Tacheva
Telerik team
 answered on 08 Dec 2020
2 answers
194 views

Is it possible to have 2 different column values show for each chart category?

1 data series would show wider than the other data series and they would be together for each vertical section?
Essentially a multi-axis column chart but merged together for matching categories.

Marin Bratanov
Telerik team
 answered on 08 Dec 2020
6 answers
810 views

Does anybody have an example of how to do this in the blazor grid?

If not,  does anybody have an example of a dropdownlist column template that show the text in the grid but stores the id in the list of items for the grid?

Thanks … Ed

 

Marin Bratanov
Telerik team
 answered on 08 Dec 2020
1 answer
1.3K+ views

Will Telerik Blazor components support this new functionality in the future?

https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.components.elementreferenceextensions.focusasync?view=aspnetcore-5.0#Microsoft_AspNetCore_Components_ElementReferenceExtensions_FocusAsync_Microsoft_AspNetCore_Components_ElementReference_

Set UI focus in Blazor apps
    
Blazor now has a FocusAsync convenience method on ElementReference for setting the UI focus on that element.

<button @onclick="() => textInput.FocusAsync()">Set focus</button><input @ref="textInput"/>

Svetoslav Dimitrov
Telerik team
 answered on 04 Dec 2020
2 answers
334 views

I am using a telerik tab control with a grid in one tab.  If you sort, filter, or page the grid; the state will be lost if you click into a tab and then back to the tab with the grid.  What's the proper way to save this state?

 

Thanks - Doug

Doug
Top achievements
Rank 1
Veteran
 answered on 03 Dec 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?