<ErrorBoundary @ref="errorBoundary">
<ChildContent>
@Body
</ChildContent>
<ErrorContent Context="ex">
@{
OpenNotification("Unhandled exception ocurred. Please try again later.", ThemeColor.Error, CloseAfter.Success);
// TODO: this code is called twice!
}
</ErrorContent>
</ErrorBoundary>
Open Notification it's a private method to show error message
private void OpenNotification(string text, string theme, int closeAfter)
{
Notification.Instance.Show(new NotificationModel
{
Text = text,
ThemeColor = theme,
CloseAfter = closeAfter
});
}
so when error happens notification is shown 2 times, I set console log in this code and it's logging two times execution.
Any idea what could be the problem?
Thanks
Any chance of having the CheckParents functionality of the TreeView component in the TreeList component?
KR
I have tried the following code on the official page of the Telerik pager
</TelerikPager>
@{
}
The output is as follows:
Image 1. Output
Image 2: Items per page show all options
I've configured a PageSize of 20 with PageSizes as {5, 6, 7, 8, 9, 10, 20}, and intentionally excluded null to avoid an "All"
option in the items-per-page dropdown.
However, when the PageSize matches the total count of data (20 in this instance), the dropdown doesn't automatically
select the matching option (20).
In the second image, all dropdown options are visible, but the appropriate option (20) isn't auto-selected.
What is the solution to this issue?
Is it possible to have TelerikGrid for Blazor configured so when grid is using inline edit, as user tabs to next cell an event is triggered so that manual updates can be done to the row data, as simplest example, cells are quantity, unitcost, gst, total so that as unitcost is changed / exited the gst is calculated as quantity*unitcost*0.10 and total is calculated as quantity*unitcost+gst
I've been searching for hours and I'm starting to arrive at conclusion it is not easily done.
Cheers
Steve Wark
I have a combobox component that can draw on available properties such as "Class" and "MaxHeight." However, when I try to implement comboboxes, I see no way to disable them. Below is a portion of the RenderComboBox method. I can only avoid the error by commenting out "d.AddAttribute(302, "Enabled", "false");"
RenderFragment item = d =>
{
d.OpenComponent<ComboBoxPopupSettings>(20);
if (RowCount == 0) { RowCount= 20; }
d.AddAttribute(300, "MaxHeight", $"{(RowCount * 22).ToString()}px");
d.AddAttribute(301, "Class", "telCombo");
d.AddAttribute(302, "Enabled", "false");
d.CloseComponent();
};
The above code earns me the message
"Object of type 'Telerik.Blazor.Components.ComboBoxPopupSettings' does not have a property matching the name 'Enabled'."
Indeed, when I look it up, the list of inherited members has nothing for enabling/ disabling the feature. How can i disable it?
Adding FormItem inside the FormItems got System.ArgumentNullException: Value cannot be null. (Parameter 'For') when rendering
This is my code of course the Model and EditContext will be different.
<TelerikForm Model="FarsDetailSate.Model"@
Hi,
I have a TelerikForm containing a Fluent Validator and 2 buttons.
Only one of them has to validate the form.
However, even if I set NO code into the button's associated method, it does trigger the validation.
Seems to be a default behaviour.
How to disable it for my second button?
Thx in advance
A
Hi there!
I have created a component (Component) that is a TileLayoutItem. It renders fine for the first time but it doesn't re-render after its properties changes (OnClickHandler).
Am I doing something wrong? The exact same code works if added directly on Main.
Running example: https://blazorrepl.telerik.com/mnbQmvlX24maslQE52
Component
<TileLayoutItem>
<HeaderTemplate>
<a href="#">Component<span class="k-icon k-i-caret-alt-right widget-title-icon"></span></a>
</HeaderTemplate>
<Content>
@test
<TelerikButton OnClick="@OnClickHandler">Click me!</TelerikButton>
</Content>
</TileLayoutItem>
@code {
private string test = "Button was not clicked yet";
private void OnClickHandler(MouseEventArgs args)
{
test = "Button was clicked at: " + DateTime.Now.ToString();
}
}
Main
<TelerikTileLayout Columns="1">
<TileLayoutItems>
<Component></Component>
<Component></Component>
<TileLayoutItem>
<HeaderTemplate>
<a href="#">TileLayoutItem<span class="k-icon k-i-caret-alt-right widget-title-icon"></span></a>
</HeaderTemplate>
<Content>
@test
<TelerikButton OnClick="@OnClickHandler">Click me!</TelerikButton>
</Content>
</TileLayoutItem>
</TileLayoutItems>
</TelerikTileLayout>
@code {
private string test = "Button was not clicked yet";
private void OnClickHandler(MouseEventArgs args)
{
test = "Button was clicked at: " + DateTime.Now.ToString();
}
}
Here is the problem:
When the page first loads, the grid attempts to load the layout defined on the page. This causes a OnRead event to occur as is expected. However, the OnStateInit does NOT fire before this OnRead event. Actually, this is not entirely correct. The initial OnRead is running independent of the OnStateInit, it simply fires and it returns when it feels like it. At some point the OnStateInit fires. I load a saved GridState layout in the OnStateInit event which causes the OnRead to fire again.
This causes a couple problems. The grid will load, and then reload as the args.GridState is set in OnStateInit. This causes ugly page flashing, and two data requests when only one is required. Even worse since both requests are async, you are not sure which layout you will get, since the last one to come back is the one you get, which can and does occur randomly.
I can return no data for the initial request in OnRead, and this does work, however I can find no reliable way inside of the OnRead event to determine which is the initial load I don't want and which is the OnRead fired from the args.GridState set in OnStateInit which I do want.
My question is, how do I prevent the initial grid data request and load?
Bryan