Telerik Forums
UI for Blazor Forum
1 answer
193 views

We currently have a legacy MVC application that we want to migrate to Blazor WebAssembly.

One of our problems is that, when using navigation to route to a MVC page via NavigationManager (which is done everywhere by Telerik UI), Blazor WebAssembly routes internally to NotFound. We would like to override that behaviour but are facing some issues:

1. We tried overriding the Telerik UI behaviour by overriding the onselect handler on some components (i.e. Drawer). While that works fine not every component that does routing seems to have a corresponding overridable event.

2. We tried overriding the navigation event globally using NavigationManager.RegisterLocationChangingHandler to cancel the navigation event and emit a new one (with forceLoad set to true). This seems to not work. Here is the code of our handler. It is getting called and the event is also cancelled just fine. It just seems that the forceLoad does not get respected in that case:

private ValueTask OnLocationChanging(LocationChangingContext context)
{
    if (BlazorPages.Internal.Contains(context.TargetLocation))
    {
        return ValueTask.CompletedTask;
    }

    if (Uri.TryCreate(context.TargetLocation, UriKind.Absolute, out Uri? _))
    {
        return ValueTask.CompletedTask;
    }

    context.PreventNavigation();

    NavigationManager.NavigateTo(context.TargetLocation, forceLoad: true);

    return ValueTask.CompletedTask;
}

3. We tried using anchor tags for routing. While that works fine it is really much work to implement this into every component that is getting used. While components can be made reusable we'd have to re-template some others every time since you can't just copy-paste them from the source project. There is not just that problem but also that anchor tags break the styling at every component that I tried until now and we have to style them correctly which also consumes much time.

 

So, the question here is: What is the correct way to handle this use case? Do we really have to rewrite most components that include anchor tags? Is there maybe an alternating Telerik UI version that actually uses anchor tags instead of programmatical routing (which would be really nice since we would get things like right click to open new tab features)?

Dimo
Telerik team
 answered on 08 Oct 2024
0 answers
138 views

I am trying to use a Telerik MultiSelect to allow the user to select multiple values with filtering, however with my initial implementation I am stumbling into an odd error where the first select item basically "prevents" scrolling.

 

 

As you can see from above, I select the first item, but then no matter if I use my scroll wheel or the vertical scroller on the side, the component automatically snaps back to the selected item being in focus..

 

I am running the latest Telerik.UI.for.Blazor 6.2.0 and this project is a Blazor Maui app running .Net 8.0.. 

Erik
Top achievements
Rank 1
 asked on 04 Oct 2024
1 answer
210 views
I`m looking to improve the UX around the Editor Component and to incorporate grammar/rewrite capabilities. It seems Telerik Components are bit light when it comes to AI integration and don`t see anything on the roadmap either.

For comparison Syncfusion have a whole set of integrations (Introducing the AI-Powered Smart Blazor Components and Features (syncfusion.com)) and specifically one for their Editor which gives it grammar/rewrite/summarisation capabilities.

All I`ve found from Telerik is the AI Prompt which is only useful if you`re looking for a chatbot experience. 
Dimo
Telerik team
 updated answer on 04 Oct 2024
1 answer
184 views

I don't like the "Default" behavior of adding items to TelerikScheduler ... there is NO visible UI cue for users on how to add an item to the schedule ... they have to be told to double click on a day, this is bad UI design.

I realize I can just create my own Add button and manage adding of schedule items.  BUT, I was wondering if Telerik offered a custom Add option either with the OnCreate or something else?  Something along the lines of how Add is supported in TelerikGrid with GridToolBarTemplate and GridCommandButton??

Rob.

Nansi
Telerik team
 answered on 04 Oct 2024
1 answer
152 views

I'm a newbie about to try putting a carousel in my first app.  I notice, however, that when the carousel loops back to the beginning, the visual appearance truly is of going back to the beginning.  Is there an easy way to make it look, instead, like it's an endless loop?  Obviously the buttons would betray the truth, but the images would appear to move forward continuously.

Thanks!

Hristian Stefanov
Telerik team
 answered on 04 Oct 2024
1 answer
149 views
  1. 1how i disable context menu in telerik pdfviewer
  2. how i disable text selection  or copying

 

Hristian Stefanov
Telerik team
 answered on 03 Oct 2024
1 answer
222 views

Hello there,

I am using the Telerik Predefined Dialogs for several different uses, and I want to add the x Close icon in the upper right corner. I know it's redundant, but it's a project requirement and it also seems to be best practice for UI/UX.

if (DisclosureReportSelections.ActivitySelection == -1)
        {
            await Dialogs.AlertAsync("Activity must be reported for this period.", "Report Information Required");
            return false;
        }

I like the Predefined Dialogs because they provide 'await' for the user's response, which is handy and efficient in code. I do not want the hassle of customizing a standard Dialog while managing it's visible state.

Attached image for reference.

Hristian Stefanov
Telerik team
 answered on 02 Oct 2024
0 answers
174 views

Hi,

We're trying to make use of Telerik's NPM package with our Blazor project, along with that we want to only implement the individual components we want to use for our stylesheet instead of using `dist/all.

We are using DartSassBuilder to compile our SCSS files.

Below are screenshots of our implementation:


With this we are unable to actually build the app, the build errors didn't work well, but even changing this to use WebCompiler it doesn't work:


It seems both DartSassBuilder and WebCompiler can't make use of the @ naming, and we're unsure of what to do to solve this.

 

Note:

- Everything will work if we just run it with `dist/all.scss`, however to make the app load faster we want to rather compiler our own custom SCSS solution, namely for Grid and some inputs.

- This is the second blazor project with this issue.

- Both projects use Blazor WASM Standalone

Benjamin
Top achievements
Rank 1
 asked on 01 Oct 2024
1 answer
99 views

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

 

Dimo
Telerik team
 answered on 01 Oct 2024
1 answer
169 views

Good evening.

I would like to word wrap the text in the drawer component, this is an example where I would like the wrap (see the first row in which I've added more text to show the ellipses):

https://blazorrepl.telerik.com/mSEjwWvZ12HeWVRp26

May you kindly help me?

Thank you.

Hristian Stefanov
Telerik team
 answered on 30 Sep 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?