This is a migrated thread and some comments may be shown as answers.

Balzor.NET : URL problem pager and refresh

2 Answers 15 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Gert
Top achievements
Rank 1
Gert asked on 20 Nov 2018, 03:05 PM

Dear Telerik,

 

We are using  Kendo JQuery with Blazor.Net and it is working fine. We can set the datasource from C# and can pass the selected row from JQuery to C# and so on.
But we have one big problem. All Gridbuttons like Refresh, Next Page,... are going to the root URL with '#'  . In my case  http://localhost:51996/# instead of

going to the page the grid is active on 'http://localhost:51996/fetchdata' . This is probably caused by the router in Blazor.NET.

Is there a way to solve this ? Is there a way to set the URL the button-clicks are going to ?

Regards,

Gert

2 Answers, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 22 Nov 2018, 01:01 PM
Hello,

Kendo UI widgets use <a href> tags extensively for most of it's buttons and clickable elements. This is mainly for accessibility reasons, and what we do is handle the click event and call e.preventDefault(). For some reason this doesn't work in Blazor. I would suggest logging this as a bug in the Blazor repo, so that they can take a look and fix this. Unfortunately there's little we can do at the moment, since we can't change the rendering of all buttons, and the correct javascript workaround (calling preventDefault() ) doesn't work.

Regards,
Bozhidar
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Henri
Top achievements
Rank 1
answered on 22 Nov 2018, 02:55 PM

Dear Bozhidar,

thank you for looking into this. We will address this to the Blazor Community.
We found a workaround by calling the following JQuery Code after Grid creation :

$("a[href='#']").attr({ "href": subdir+"/#" });

 

Hopefully Blazor will come with a better solution.

Regards,

Gert

Tags
Grid
Asked by
Gert
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Henri
Top achievements
Rank 1
Share this question
or