I'm trying out the TelerikPdfViewer component in my Net7 Blazor Wasm project, but text PDFs open up with text that has missing parts.
Sample:
If I change the scale and change back using the zoom in/out buttons, the problem is fixed. But the garbled text appears at each first viewing for all scale stops.
I get this in Chrome and in Edge, browser scaling at 100%, desktop scaling at 100% but alternate scaling for both also still have the same issue.
I followed How to set up in Blazor application | Telerik Reporting
All done! But when it run i got an error "telerikWebReportDesignerInterop.js 404"
<script src="_content/telerik.webreportdesigner.blazor/telerikWebReportDesignerInterop.js" defer></script>
and in console show:
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit 'Gyr8E4g_PwQHf7G2UKY2h3obMpujPfFp2x9i7dkB4oQ'.
Microsoft.JSInterop.JSException: Could not find 'telerikWebReportDesignerInterop.createWebReportDesignerWidget' ('telerikWebReportDesignerInterop' was undefined).
Error: Could not find 'telerikWebReportDesignerInterop.createWebReportDesignerWidget' ('telerikWebReportDesignerInterop' was undefined).
at https://localhost:5001/_framework/blazor.server.js:1:67713
at Array.forEach (<anonymous>)
at e.findFunction (https://localhost:5001/_framework/blazor.server.js:1:67673)
at v (https://localhost:5001/_framework/blazor.server.js:1:69415)
at https://localhost:5001/_framework/blazor.server.js:1:70361
at new Promise (<anonymous>)
at e.beginInvokeJSFromDotNet (https://localhost:5001/_framework/blazor.server.js:1:70334)
at https://localhost:5001/_framework/blazor.server.js:1:26441
at Array.forEach (<anonymous>)
at e.invokeClientMethod (https://localhost:5001/_framework/blazor.server.js:1:26411)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
Telerik Reporting 15.1.21.616
<PackageReference Include="Telerik.Reporting.Services.AspNetCore" Version="15.1.21.616" />
<PackageReference Include="Telerik.Reporting.OpenXmlRendering" Version="15.1.21.616" />
<PackageReference Include="Telerik.ReportViewer.Blazor" Version="15.1.21.616" />
<PackageReference Include="Telerik.WebReportDesigner.Blazor" Version="15.1.21.616" />
<PackageReference Include="Telerik.WebReportDesigner.Services" Version="15.1.21.616" />
Startup.cs
namespace CSharp.Net5.BlazorIntegrationDemo
{
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using System;
using Telerik.Reporting.Cache.File;
using Telerik.Reporting.Services;
using Telerik.WebReportDesigner.Services;
public class Startup
{
public Startup(IConfiguration configuration)
{
this.Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
services.AddRazorPages()
.AddNewtonsoftJson();
services.AddServerSideBlazor();
// Configure dependencies for ReportsController.
services.TryAddSingleton<IReportServiceConfiguration>(sp =>
new ReportServiceConfiguration
{
ReportingEngineConfiguration = sp.GetService<IConfiguration>(),
HostAppId = "Net5BlazorDemo",
Storage = new FileStorage(),
ReportSourceResolver = new UriReportSourceResolver(System.IO.Path.Combine(sp.GetService<IWebHostEnvironment>().ContentRootPath, "..", "..", "..", "..", "Report Designer", "Examples")),
});
// Configure dependencies for ReportDesignerController.
services.TryAddSingleton<IReportDesignerServiceConfiguration>(sp => new ReportDesignerServiceConfiguration
{
DefinitionStorage = new FileDefinitionStorage(
System.IO.Path.Combine(sp.GetService<IWebHostEnvironment>().ContentRootPath, "..", "..", "..", "..", "Report Designer", "Examples")),
SettingsStorage = new FileSettingsStorage(
System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Telerik Reporting")),
ResourceStorage = new ResourceStorage(
System.IO.Path.Combine(sp.GetService<IWebHostEnvironment>().ContentRootPath, "..", "..", "..", "..", "Report Designer", "Examples", "Resources"))
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
}
app.UseStaticFiles();
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
endpoints.MapBlazorHub();
endpoints.MapFallbackToPage("/_Host");
});
}
/// <summary>
/// Loads a reporting configuration from a specific JSON-based configuration file.
/// </summary>
/// <param name="environment">The current web hosting environment used to obtain the content root path</param>
/// <returns>IConfiguration instance used to initialize the Reporting engine</returns>
static IConfiguration ResolveSpecificReportingConfiguration(IWebHostEnvironment environment)
{
// If a specific configuration needs to be passed to the reporting engine, add it through a new IConfiguration instance.
var reportingConfigFileName = System.IO.Path.Combine(environment.ContentRootPath, "reportingAppSettings.json");
return new ConfigurationBuilder()
.AddJsonFile(reportingConfigFileName, true)
.Build();
}
}
}
WebReportDesignerDemo.razor
@page "/webreportdesigner"
@using Telerik.WebReportDesigner.Blazor
<style>
#wrd1 {
position: relative;
height: 880px;
padding-right: 50px;
}
</style>
@* Create the WebReportDesignerWidget *@
<p>This Web Report Designer instance works with reports hosted locally using the Reporting REST service. For more information, visit the <a target="_blank" href="https://docs.telerik.com/reporting/web-report-designer">Web Report Designer</a> article.</p>
<WebReportDesigner DesignerId="wrd1"
ServiceUrl="/api/reportdesigner"
Report="Dashboard.trdp"
ToolboxArea="new ToolboxAreaOptions() { Layout = ToolboxAreaLayout.List }"
PropertiesArea="new PropertiesAreaOptions() { Layout = PropertiesAreaLayout.Categorized }" />
I a working on an app that has x number of steps depending user configuration. I need to be able to call a service to load the model that I pass into the step. However, I have not had any success finding an event. I also tried using the OnInitialized within the component inside the step. But that has not worked either. Is there any event which will fire before the parameter is passed to the component within the step.
Note: I really want contain it within the step because I have no way of know which steps are available without some complex logic.
@if (WizardInfo.ShowIncomeDetails)
Hello.
Can someone give me a complete example with Custom Batch Editing Grid? Like with a "real" API and CRUD operations?
My apps run under BLAZOR WEB ASSEMBLY.
Thanks a lot everyone.
We have a custom control where we host a Google Map.
We created custom google map controls and placed it like google maps api requires.
Everything works fine when the control is normally displayed as shown here:
but when the user put the map in fullscreen mode, our dropdownlist can't be opened because the animation-container isn't placed within the hierarchy of the element hosting the map, causing the dropdownlist popup to be behind the "top-layer" element of the page.
Technically the problem is that when an element is set in fullscreen mode (but this happens even for HTML dialog elements and popup), the browser create a special layer where it places these elements (and their childrens).
In the case of dropdownlist, you create k-animation-container telerik-blazor elements straight under the app div, this mean that any dropdownlist (and i suppose combobox items and every component that has a "popup") can't be shown into fullscreen elements or HTML dialogs.
Is it possible to explicitly set the dropdownlist animation container where I want? How can I fix this problem without recreate a dropdownlist component?
Thanks
I have a page with several TelerikDropDownList controls with Yes and No options, and an associated text field for notes underneath each one.
If the user selects the Yes option, I want to remove any notes in the associated text field.
Is this possible? I know about ValueChanged, but only the value is passed to the function.
Within the ValueChanged I can't figure out how to get a reference to the TelerikDropDownList that initiated the event and its associated text field.
Thanks
I've been tasked to open N popup windows that persist between page navigations. I can easily get 1 window to show by using the window component, but how do I get N of them? I'm able to get 1 to show, but if I put it in a for loop nothing shows.
I'm guessing I could potentially persist the open windows using the layout? The product manager claims other vendors are able to do this. I don't know how.
I have a toggle button in a child component, which gets the selected state passed as parameter.
The button click invokes an eventcallback back, so the parent can update the state.
When i register an method to the eventcallback of my childcomponent which also awaits a task after updating the value, the button wont change its state.
I am not a native speaker, and worried i did not explain my problem good enough so i prepared an Example
PS: I have also tried this with normal TelerikButtons. In that case i passed css classes which alter the background color, based on the value of IsSelected. This also won't when DoSomething() is called.
UPDATE: When i use the onclick event of a span, wrapped around the TelerikButtons, everything works as expected (does not work with a span inside a button).
Hi,
Is there a way to bind the selected Value in a TelerikDropdownList only when the popup is closed?
I don't want the Value to be binded, when I use the arrows (up/down) - only when I hit enter or
click on an element in the popup.
In the following code the Value is binded, when the popup is closed, but the arrows is not
working in the popup.
<ul>