When using the new MediaQuery, I am receiving an error on the iPad (Safari) but works fine with desktop and Android. Safari does not have support for addEventListener.
warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
Unhandled exception rendering component: this.mediaQueryList.addEventListener is not a function. (In 'th
is.mediaQueryList.addEventListener("change",this.onMediaChange)', 'this.mediaQueryList.addEventListener' is un
defined)
value@https://localhost:5001/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js:59:14905
e@https://localhost:5001/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js:59:14611
r@https://localhost:5001/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js:1:13840
r@https://localhost:5001/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js:59:12983
-------------------------------------------------------
I've implemented a rather ugly workaround for now but this should be resolved within Telerik itself.
Add this above <script src="_content/Telerik.UI.for.Blazor/js/telerik-blazor.js" defer></script>:
<script>
var mediaObj = window.matchMedia("");
if (typeof mediaObj.addEventListener != "function") {
mediaObj.__proto__.addEventListener = function(event, listener) {
mediaObj.addListener(listener);
}
}
</script>
Hi,
After 2.21.0 update, I noticed there is still a dependency of Newtonsoft.Json package in Telerik.DataSource, increasing the application payload with > 600k. Since .Net 5 moved to System.Text.Json context, maybe that dependency could be eliminated.
Thanks,
Ion
I have the following scenario:
- file download from a site;
- process records on file to store in a database.
The first take about 4 seconds and the second around a minute or a little more.
Followed the sample of ProgressBar to signal that records are being processed, however, the UI is not being updated.
The environment is Blazor with .NET 5.04 and the latest version of UI for Blazor
Below is the Razor component where the data is handled.
Any suggestions on how to update the UI and reflect the current status?
Thanks
@page "/importPeers"
@using DataLoader.Models
@using DataLoader.Services
@using System.Timers
@implements IDisposable
@inject LoadDataFIService service
<h1>CVM FI Download</h1>
<p>componente para realizar o download de informações da CVM e carga no banco de dados</p>
<hr />
<br />
<div class="row">
<div class="col-sm-8 col-md-8">
<div class="row">
<div class="col-sm-6 col-md-6">
<span>
Mês Referência:
<TelerikDatePicker @bind-Value="@selectedDate"
BottomView="@CalendarView.Year"
Format="MMM yyyy">
</TelerikDatePicker>
</span>
</div>
<div class="col-sm-3 col-md-3">
<TelerikButton OnClick="@OnProcessDataClick">Processar</TelerikButton>
</div>
</div>
</div>
</div>
<br />
<div class="row">
<div class="col-sm-8 col-md-8">
@processingAction
<br />
<TelerikProgressBar Indeterminate="@isIndeterminate" Value="@CurrentValue" Max="@MaxValue" />
</div>
</div>
@currentCount importados...
<hr />
@code {
public string processingAction { get; set; }
public bool isIndeterminate { get; set; } = false;
public int progressValue { get; set; } = 0;
DateTime selectedDate { get; set; } = DateTime.Now;
int currentCount = 0;
public double MaxValue { get; set; } = 100;
public double CurrentValue { get; set; } = 0;
public double StepValue { get; set; } = 5;
public Timer Clock { get; set; } = new Timer();
void OnProcessDataClick()
{
currentCount++;
ProcessData();
}
void ProcessData()
{
//signal progress bar for download
processingAction = "Downloading...";
MaxValue = 5 * 1000; // download should take no more than 4 seconds
StartProgress();
var result = service.DownloadFile(selectedDate);
// signal end of downloading
processingAction = "Downloaded!";
StopProgress();
System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch();
if (result)
{
processingAction = "Processing records...";
MaxValue = 65 * 1000; // data processing should last about a minute or more
StartProgress();
//watch.Start();
currentCount = service.ReadCsvFile(selectedDate);
//watch.Stop();
processingAction = "Records processed!";
StopProgress();
}
// Console.WriteLine(watch.Elapsed);
}
public void Dispose()
{
StopProgress();
Clock?.Close();
}
public void StartProgress(int interval = 200)
{
if (Clock?.Enabled == false)
{
Clock.Interval = interval;
Clock.Elapsed -= OnClockElapsedEvent;
Clock.Elapsed += OnClockElapsedEvent;
Clock.AutoReset = true;
Clock.Start();
}
}
public void OnClockElapsedEvent(Object source, ElapsedEventArgs e)
{
if (CurrentValue < MaxValue)
{
UpdateProgress();
}
else
{
StopProgress();
}
}
public void UpdateProgress()
{
CurrentValue += StepValue;
InvokeAsync(StateHasChanged);
}
public void StopProgress()
{
Clock?.Stop();
InvokeAsync(StateHasChanged);
}
}
Hi,
When I set grid in InCell edit mode, I have to click on grid cell, so the textbox control for edit becomes available. Can I set it active/available for edit once grid is loaded and avoid clicking on the cell?
Current scenario:
1. Grid is loaded
2. Click on the cell I want to edit
3. Text box is shown with the value for edit
4. On focus lost the updated value is shown in the cell and text box is gone
Desired scenario:
1. Grid is loaded
2. No need to click on any cell, all available cells for edit are showing text boxes with the value for update
3. Update desired values in the grid cells text box
4. On focus lost the updated value is shown in the cell and text box is gone
Thanks,
Max
I have a context menu being opened by right clicking on a row in my grid.
One of the sections is "Delete Item" which when clicked on shows a Dialog Confirm window.
The problem I am having is the Confirm window is showing, but the context menu does not close (go away) so both items show on the screen (and sometimes overlap).
Is there a way I can manually close the context window when an items is clicked on?
Is there any way to make the icon appear to right of the text instead of the left?
I have tried messing with css to get this work, but as of now, have not had much luck.
Would be nice if there was an IconPosition Setting on the button.
Hi,
I have to bind dropdown list in popup from Telerik grid when you click on edit. Now i wanted to get the selected value from grid.
Please help me out on this issue.
Thank you.
Is there a way to make the TelerikGrid not Width 100% as on mobile devices it looks very small, I would like it to be scrollable and show the entire header texts