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.
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
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!
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.
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!
Is there a way to open a dialog/window next to the button that opened it?
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> ...
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.
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