Hi all,
I've been observing a strange behavior and cannot seem to find out what causes it. This is primarily to collect some general ideas and learn about principles that I may have missed. I hate to say it but the fact I'm posting it here already suggests that Telerik Blazor UI might be involved, even if it is only by me using it wrong. Before I switched (from Bootstrap UI) to Telerik's Blazor UI, the solution operated more swiftly but was optically inconsistent if not outright ugly. Using Telerik Blazor UI introduced the desired consistency and working with the components is mostly a breeze. I don't regret my choice at all, and will do whatever is needed to keep it part of the solution.
For more context: this is about a multi-layered Blazor app (ASP.NET Core 8) using Telerik's Blazor UI to give users CRUD operations on medical case data. It is supposed to show data from an Oracle relational database with Entity Framework (EF Core 8). It's a data-first approach so I have built entity classes representing each table (about 30 tables in total now) and configured their relations mostly manually. But that's not actually the point. It's just to describe why I can't just paste a small code snippet here. It's a medical application so I'm legally unable to paste code 1:1 from my solution, and it's tons of code by now. Hope the description I'm giving below is enough to put you in the frame.
There are multiple Razor pages and components, some with more and some with less complexity:
The editor page (the heaviest piece of the solution) features:
All pages use InteractiveServer render mode as that is what I found works best for me. Until now, the software is only running on my dev machine in Visual Studio 2022, and most of the time in debug mode.
IMPORTANT: Let me emphasize that what I am describing here appears exclusively in debug mode as long as VS2022 is attached, and not when the solution is run by dotnet run. It's a p.i.t.a. though to debug with the handbrake engaged, and I'm not sure if the process does not hide a problem even when it runs without a debugger attached. It's just much faster then but that's not proof that whatever issue it is only affects the debug scenario.
The problems begin when I start navigating between the pages. Sometimes it's really fast, sometimes the same thing takes a lot of time. In my perception it might be related to how quickly I navigate but the actual trigger for the behavior is mostly unclear at this time. Heavier pages cause longer delays (and more exceptions along the way), while being loaded as well as while navigating away from them. But it's not consistent enough to point to an overall page or DOM size-related issue.
What struck me is that the debug console gets flooded with errors like these as delays are happening:
Exception thrown: 'Microsoft.JSInterop.JSDisconnectedException' in Microsoft.JSInterop.dll
Exception thrown: 'Microsoft.JSInterop.JSDisconnectedException' in System.Private.CoreLib.dll
Exception thrown: 'Microsoft.JSInterop.JSDisconnectedException' in System.Private.CoreLib.dll
Exception thrown: 'Microsoft.JSInterop.JSDisconnectedException' in Microsoft.AspNetCore.Components.Server.dll
The one from System.Private.CoreLib.dll appears twice most of the time, sometimes only once. A block like this is shown repeatedly up to 90 times in quick succession, in worse cases, sometimes only ten of these blocks appear in the console. But it's always this combination of the same three DLLs being addressed. When this happens, no other exceptions mix in, it's a constant stream of these three / four exceptions. The application is massively slowed down as this happens. Not as much as showing me a waiting indicator and reconnecting in the page though.
What's also interesting is that the user-end of the solution, besides being very slow at times, behaves fully normally. There are no errors or exceptions apparent to the user. To me this looks like the exceptions are silently consumed somewhere without giving further detail. Each occurrence takes some processing time. I can't say where the exceptions are thrown - probably somewhere deep inside the JS layers - but it's really unsettling and I have some doubts about moving this to production unless this is clarified a bit better.
The Edge browser's developer tools show nothing unusual. The JavaScript console there stays error-free, and running a network recording during a page refresh does show that loading takes very long (about 5 out of 10 seconds are spent with no traffic at all), but all HTTP operations have status 101 (switching protocols) or 200 (success). No error indication at all there.
I beg your pardon for being too unspecific where it may count but this is honestly my first Blazor application at all, and it's a monster of a project right away. I'm overwhelmed by the time pressure already and there's no team mates to help out. Random delays are the last thing I need.
So to wrap this up, what I'm looking for is basically guidance like:
Thank you all for reading, and in advance for any clues.
Cheers, have a nice day!
Joe
Is it possible to change the headings in the column chooser menu?
This is supported in other Telerik products by using the Messages property which is absent in Blazor
As of right now, the TelerikMenu generates a menu where each menu item is a span with an onclick handler that navigates to the page. It looks like this:
<li data-id="..." tabindex="0" class="k-item k-menu-item k-first" role="menuitem" aria-live="polite">
<span class="k-link k-menu-link ">
<span class="k-menu-link-text">
Page Title
</span>
</span>
</li>
However, because they are only spans, when right clicking on a menu item, there is no option to open the link in a new tab. In addition, middle clicking the menu item doesn't work either. Can these be changed to anchor tags so menu items can be opened in a new tab? I know there is an ItemContext that can be added to the TelerikMenu, but I would like to keep all the styling of the default TelerikMenu.
Hello Everyone,
I'm working on a Blazor Server project, and I've replaced the default navigation menu with a TelerikMenu component. It produces this:
When I click the Counter, Weather, etc, I get to the correct page. Here's how my project is layed out:
You can see that the Home.razor page is in the same location as the Weather and Counter page. I'm also able to get to the pages under the DisplayData folder. Here's the code:
<div>
<img src="picture.png" style="height: 300px; margin-right: 10px;">
</div>
<TelerikMenu Data="@MenuData"
Orientation=@MenuOrientation.Vertical></TelerikMenu>@code{
public List<MenuItem> MenuData { get; set; }
public class MenuItem
{
public string Text { get; set; }
public string Url { get; set; }
public ISvgIcon Icon { get; set; }
public List<MenuItem> Items { get; set; }
}
protected override void OnInitialized()
{
GenerateMenuData();
}
public void GenerateMenuData()
{
MenuData = new List<MenuItem>()
{
new MenuItem()
{
Text = "Home",
Url = "Home",
Icon = SvgIcon.Home
},
new MenuItem()
{
Text = "Counter",
Url = "Counter",
Icon = SvgIcon.Calculator
},
new MenuItem()
{
Text = "Weather",
Url = "Weather",
Icon = SvgIcon.Globe
},
new MenuItem()
{
Text = "Display Data",
Url = "",
Icon = SvgIcon.Data,
Items = new List<MenuItem>()
{
new MenuItem()
{
Text = "Delme Table",
Url = "/DelMeTable",
Icon = SvgIcon.Data // SvgIcon.User
},
new MenuItem()
{
Text = "Delme Telerik",
Url = "/DelmeTelerikTable",
Icon = SvgIcon.Data
},
new MenuItem()
{
Text = "Delme Telerik SQL",
Url = "/DelmeTelerikTableSQL",
Icon = SvgIcon.Data
}
}
}
};//end of MenuData
}//end of GenerateMenuData()
//
}When I try to get back to the Home page, I get a "Not Found" error. Also of note, when the application launches to the Home page, here is the URL (from the debugger): localhost:7044.
My question is, how do I set the URL for the home page to get back to it?
Thanks,
Mike

Hi
I'm using the TelerikMenu component with multiple nested levels of menu items. When moving the cursor from inside a nested level, to a parent level that is not in the currently selected path, the menu disappears.
View this example on REPL: https://blazorrepl.telerik.com/mIvFOglY481u2hRG05
When moving the cursor from "Item A1 - 1" to "Item A2", the menu disappears.
Because I have a large menu with multiple levels, it would improve user experience to keep the menu visible as long as the cursor hovers it. Is there any way to make this happen?
Best regards
Bram
hi
I want to create a session after the user clicks on the button and display this user's information such as UserName or UserID in a section of the MainLayout
In the MainLayout page, the currentUser_Id parameter value received from the session is displayed correctly in the paragraph, but this value is not passed to the paragraph inside the section.
In fact, I want to show the value of User _id which is created in the login page and in the session in a part of the page app .razor or mainLayout .razor as user information.
please help me
LoginPage.razor:
@page "/"
@using BlazorSessionApp.Layout
@layout LoginLayout
@inject NavigationManager NavigationManager
@inject ProtectedSessionStorage ProtectedSessionStore
<button class="btn btn-primary" @onclick="Submit">Enter</button>
@code
{
private async Task Submit()
{
await ProtectedSessionStore.SetAsync("User_Id", 500);
NavigationManager.NavigateTo("/Home", true);
}
}
App.razor :
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
<link rel="stylesheet" href="bootstrap/bootstrap.min.css" />
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="BlazorSessionApp.styles.css" />
<link rel="icon" type="image/png" href="favicon.png" />
<HeadOutlet @rendermode="InteractiveServer" />
</head>
<body>
<SectionOutlet SectionName="mysection" />
<Routes @rendermode="InteractiveServer" />
<script src="_framework/blazor.web.js"></script>
</body>
</html>
MainLayou.razor :
@inherits LayoutComponentBase
@inject ProtectedSessionStorage ProtectedSessionStore
<p>OutOf Section:@currentUser_Id</p>
<SectionContent SectionName="mysection">
<p>into My Section:@currentUser_Id</p>
</SectionContent>
<div class="page">
<div class="sidebar">
<NavMenu />
</div>
<main>
<div class="top-row px-4">
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
</div>
<article class="content px-4">
@Body
</article>
</main>
</div>
@code {
public int currentUser_Id;
public bool isConnected;
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
isConnected = true;
await LoadStateAsync();
StateHasChanged();
}
}
private async Task LoadStateAsync()
{
var result = await ProtectedSessionStore.GetAsync<int>("User_Id");
currentUser_Id = result.Success ? result.Value : 0;
}
private async Task IncrementUser_Id()
{
currentUser_Id++;
await ProtectedSessionStore.SetAsync("User_Id", currentUser_Id);
}
}
How would I add an input to the template of a menu? View the following REPL, it does not accept keyboard input, but it DOES accept input if holding down shift and entering capital letters. I assume the menu is capturing keystrokes somewhere.
https://blazorrepl.telerik.com/QeEtnaFW52QfOcqb30

Hello Telerik,
When I first generator the Grid the menu appears as expected.
When I AutoFit All Columns the NavMenu is mis-alligned.
Thank you