Telerik Forums
UI for Blazor Forum
1 answer
15 views

Can you explain the differences between the Dialog vs the Window Component?  And maybe give an example of when you should use one over the other?  

IN their current form, they seem pretty similar in implementation and functionality if you put aside the predefined dialogs.  

Dimo
Telerik team
 answered on 12 Apr 2024
1 answer
16 views

On the Filter component I have observed that when it is added to a Dialog component it no longer functions correctly. You can add filters but can't remove any of them without generating an exception.

The Filter component will allow you to add filters but if you click the 'x' to remove a filter it will not remove. Clicking the 'x' again results in an error:

Unhandled exception rendering component: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')

Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at System.Collections.ObjectModel.Collection`1.RemoveAt(Int32 index)
at Telerik.Blazor.Components.Filter.FilterGroup.OnFilterRemove(Int32 index, String removedFilterId)
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

 

I also noticed that if you remove the binding from the Filter it fails the same way: https://blazorrepl.telerik.com/weEHQCQa49xsfTxF28

 

Nansi
Telerik team
 answered on 01 Apr 2024
1 answer
19 views

Hi,

I have a situation where I want a button to be part of form which triggers a dialog to open on top so the user can choose an image via the filemanager component. Once selected I'll handle the binding to the form item to populate the details required for the form.

However, when I have the button inside the form, and the user clicks it, the OnInvalidSubmit event is immediately triggered because the focus has now shifted to the dialog.

Is there a  way to disable this behavior? I would like the validation to only happen once the save button is pressed in this case.

Thanks!

Nadezhda Tacheva
Telerik team
 answered on 14 Mar 2024
1 answer
39 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
256 views

Is there a plan to fix this in the long term? The "work-around" listed in your documentation, Configure the Render Mode per Page found at https://docs.telerik.com/blazor-ui/getting-started/web-app#configure-the-render-mode-per-page technically functions as the root component error goes away and site starts working... 

However, it misses the bigger issue in that it now loads the entire page including all of the layout code and components, re-executing them as well... put some components in the TelerikLayout and add break points to the OnInit functions to see what I am referring to. It will now do this for every single page in application now...

So... to my initial question... what is the plan to fix/address the TelerikRootComponent in the multiple rendering mode world that is .NET 8 now?

I will say it looks like the Blazor team added a new concept of using builder.Services.AddCascadingValues() to address this problem, I have used it with our internal RootComponent to fix this same concept with our internal code... thoughts?

builder.Services.AddTelerikCascadingParameters(); is referenced at url below:

https://github.com/dotnet/aspnetcore/issues/50724 by SteveSandersonMS, I realize he was just throwing out an idea, the above line of code doesn't actually exist to my knowledge, at least not yet... :)

 

Thanks in advance!

 

Dimo
Telerik team
 answered on 11 Dec 2023
1 answer
44 views

Is there a way to open a dialog/window next to the button that opened it?

 

Dimo
Telerik team
 updated answer on 29 Nov 2023
0 answers
39 views

Hello, I have a page where user could click a button to open a modal popup. Then create a name and state association. However, after clicking the button, popup doesn't show up and the page stops responding then I have to close the page. If remove the dropdown from the modal popup, everything works fine. Below is the sample razor code. I appreiate your help. 

<TelerikDialog @bind-Visible="@ShowDialog" @ref="@DialogRef" Title="MyTelerikDialogTitle" Width="400px" >
    <DialogContent>
            <TelerikForm Id="MyTelerikForm"
                         Model="@MyModel"
                         OnValidSubmit="@OnOkSubmit"
                         OnUpdate="@OnFormUpdate"
            @ref="@FormRef">
                <FormValidation>
                    <DataAnnotationsValidator />
                </FormValidation>
                <FormItems>
                    <FormItem Field="@nameof(MyDto.Name)" LabelText="Name" /><FormItem Field="@nameof(MyDto.Address)" LabelText="Address" /> <FormItem Field="@nameof(MyDto.Zipcode)" LabelText="Zipcode" />
                    <FormItem Field="@nameof(MyDto.State)">
                        <Template>
                            <label for="StateName">State Name:</label>
                            <TelerikDropDownList @bind-Value="@MyItem" 
                                                 DefaultText="Choose a state"
                                                 Data="@StateNameDropDown"
                                                 Id="StateName">
                                <DropDownListSettings>
                                    <DropDownListPopupSettings Height="auto" />
                                </DropDownListSettings>
                            </TelerikDropDownList>
                        </Template>
                    </FormItem>  ...

Da
Top achievements
Rank 1
 updated question on 22 Nov 2023
1 answer
188 views

I have a TelerikDialog who host a component, when some logic occurs on component i would like to hide the dialog buttons, now i can do this for each button inside DialogButtons element, but this cause the dialog to show some empty space with a separation line.

I would like to hide entirely the DialogButtons element to prevent showing empty space, i tried with hidden html attribute or @if statement but it's not supported.

There is a workaround?

It woud be glad to have a Visible property on DialogButtons component in future releases.

Tsvetomir
Telerik team
 updated answer on 14 Sep 2023
0 answers
112 views

I am interested in replacing the predefined dialog function (Alert, Confirm, Prompt) with custom dialogs. I have the Alert working, but not sure how to setup a custom version of ConfirmAsync. I know I need to do an await in my custom routine, but how do I setup the async logic flow? Is an async version of the VisibleChanges event required? Is there are example you can point me to?

 

Thanks,

Bryan

 

 
Bryan
Top achievements
Rank 1
 asked on 28 Apr 2023
1 answer
202 views
Dear Team,

I am looking into the possibility to show a dialog via a capsulated service (DialogService.Show<DialogType>(...) ) but because the dialogs are only made visible they have to be in place. I managed to do this via a DynamicComponent, but I would like to inject the dialog dynamically into the dom. I have no idea how to do that though. In WPF f.e. I can add a new object into the tree at any given place. Is this not possible in Blazor?
Would love to get some support on putting such a service for showing a dialog just by a given type from an injected "Service".

Thanks for your help and best regards

Gerrit Puddig
Svetoslav Dimitrov
Telerik team
 answered on 14 Apr 2023
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?