When you have LazyLoading() enabled on an EF context, the grid throws errors similar to
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NotImplementedException: This is a DynamicProxy2 error: The interceptor attempted to 'Proceed' for method 'Void set_LazyLoader(Microsoft.EntityFrameworkCore.Infrastructure.ILazyLoader)' which has no target.
Here is a sample of the service registration that causes the issue
services.AddDbContext<ApplicationDbContext>(options =>
options
.UseLazyLoadingProxies() // this causes the problem
.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")), ServiceLifetime.Transient);
Here is the full stack trace
Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer: Warning: Unhandled exception rendering component: Object reference not set to an instance of an object.Hi,
Any information on when the Layout Components available in AspNetCore will be available in Blazor?
I am currently putting a proposal together to purchase Telerik for Blazor and could really use some of those components to enhance the application than relying on 3rd-Party integrations.
Hi!
I want to create a grid with multiselect options (controlled by checkboxes in the first column). I have used code from https://demos.telerik.com/blazor-ui/grid/selection but when i try this code in my project there are no checkboxes in the first column, just empty cells. Am i the only one with this problem?
Hi!
I'm trying out Marin Bratnov's code (from a Link - demonstration code). When i try to write a letter in a TelerikComboBox control it is automatically cleared out. I get the same behavior in my own project too. Filtering TelerikComboBox outside the grid works perfecly. Please check te video.
It seems like Blazor on the server-side will be re-branded as Razor Components. Will Telerik support it?
I have a TelerikComboBox in an EditorTemplate within a Grid. Code looks like this:
<TelerikComboBox Data="@CustomerPayCodes"
@bind-Value="@PayItemMapInEdit.ClientPayCode.UniqueId"
Placeholder="Select..."
Filterable="true"
TextField="PayCodeDisplayName"
ValueField="UniqueId"
@ref="_clientPayCodeComboBox"
Width="auto"
Enabled="@(string.IsNullOrEmpty(_payItemTextBoxRef?.Value))">
</TelerikComboBox>
Where reference prop looks like this:
private TelerikComboBox<PayCode, Guid> _clientPayCodeComboBox;
When adding a new row, the Placeholder text becomes the empty GUID, until I click in the box and then outside, upon it changes to correct "Select...". The GUID is never supposed to be showed at all in the box, that is only the binded value.
See attached pictures.
Please advice.
Br,
Sten
I have an animationcontainer which I in overridden OnAfterRenderAsync(bool firstRender) call:
await AnimationContainerSettings.ShowAsync();
...since it is the only way to show the AnimationContainer from start. However, when I in some cases return to the page, the animationcontainer will only show itself if I delay the call with e.g. 1000 ms:
await Task.Delay(1000);
await AnimationContainerSettings.ShowAsync();
What could be possible reasons for this be? If I want my AnimationContainer to be visible as default when page is either Initialized or after rendering has occured, where and how should I call ShowAsync()?
Br,
Sten
When I create multiple tabs and each tab has the same type of component, the OnInitialized is only running for the first one I click on.
Here is a simplified example to demonstrate:
MAIN PAGE:
@page "/tabtest"
@using Telerik.Blazor.Components
<div>Product XYZ</div>
<TelerikTabStrip TabPosition="Telerik.Blazor.TabPosition.Top" @ref="productTabStrip" @bind-ActiveTabIndex="@ActiveTabIndex">
<TabStripTab Title="Details">
<div class="container sms-tab-content">
GENERAL PRODUCT INTRO STUFF HERE
</div>
</TabStripTab>
@foreach (var item in listOfWidgets)
{
<TabStripTab Title="@item.WidgetName" Disabled="false">
<Widget WidgetID="@item.WidgetID" WidgetName="@item.WidgetName" />
</TabStripTab>
}
</TelerikTabStrip>
<div style="margin-top: 15px;">
<div><b>Below is a flat non-tab example of repeating widgets:</b></div>
@foreach (var item in listOfWidgets)
{
<Widget WidgetID="@item.WidgetID" WidgetName="@item.WidgetName" />
}
</div>
@code {
Telerik.Blazor.Components.TelerikTabStrip productTabStrip;
public int ActiveTabIndex { get; set; } = 0;
protected class Widget
{
public int WidgetID { get; set; }
public string WidgetName { get; set; }
}
private List<Widget> listOfWidgets = new List<Widget>();
protected void GetData()
{
listOfWidgets.Add(new Widget { WidgetID = 1, WidgetName = "Cog" });
listOfWidgets.Add(new Widget { WidgetID = 2, WidgetName = "Wheel" });
listOfWidgets.Add(new Widget { WidgetID = 3, WidgetName = "Bloof" });
}
protected override void OnInitialized()
{
GetData();
}
}
WIDGET COMPONENT:
@page "/widget/{WidgetID:int}/{WidgetName}"Looking for feature parity with - https://www.telerik.com/kendo-react-ui/components/grid/data-operations/odata-server-operations/
ADMIN NOTE: The goal is to expose a method like args.Request.ToODataString() for the grid OnRead event, so you can pass this on to a service so it knows the grid state (page size, current page, filtering,..). The grid will still expect the total of items and the current page of data to be set in the local fields.
Our grids / drop downs / comboboxes pull 1000s of items, resulting in JSON of 20mb+ if we pull all of the elements to the client. The OData server operations have greatly reduced what we send over the wire, and have worked amazing well in our current React application. Would love to have the same capability for Blazor client side. We are treating Blazor as a client side replacement for React/Redux, we do not want to run Server Side Blazor.
On the demo page, when I hover over menu items "Overview" and "Demos" and "Roadmap" it changes background color to gray. When I load it into a project with the verbatim demo code no background color change occurs except on "Roadmap".
<TelerikMenu Data="@MenuItems"