Telerik Forums
UI for Blazor Forum
1 answer
33 views

I am using the TelerikUpload component with UploadChunkSettings defined.
Telerik.UI.for.Blazor version 9.0.0

When not using a chunked upload I can return a response body a read it in the success handler, however when code was changed to use chunks the response body is always empty.

Is this a bug when using chunked upload, or do I need to return a different response in the Controller?

 

Code from the save method in Api Controller:

string chunkMetaData = formData["chunkMetaData"].ToString();

ChunkMetaData chunkData = JsonConvert.DeserializeObject<ChunkMetaData>(chunkMetaData);

// Append chunks to file
// ...


if (chunkData.TotalChunks - 1 == chunkData.ChunkIndex)
{
     uploadComplete = true;
     fs.Flush();
}

// More code omitted ...

if (uploadComplete)
{
	Response.StatusCode = StatusCodes.Status200OK;
	await Response.WriteAsync(result.ResultId.ToString());

	return new EmptyResult();
}
else
{
	Response.StatusCode = StatusCodes.Status201Created;
	await Response.WriteAsync("Chunk upload successful.");
	
	return new EmptyResult();
}

 

OnSuccess handler:

protected async Task SuccessHandler(UploadSuccessEventArgs args)
{
	int resultid = 0;

	if (int.TryParse(args.Request.ResponseText, out resultid))
	{
		//  do something with the resultid
		//  ...
		//  args.Request.ResponseText is always empty when using chunked upload
	}
}



Dimo
Telerik team
 answered on 01 Aug 2025
1 answer
29 views

Documentation says to reset the layout by calling: dockManager.SetState(null);

 

Doing this via code doesn't seem to do anything.  I've tried all combinations of the commented out code below.  


<TelerikDockManager Height="100vh" OnStateChanged="OnStateChanged" OnStateInit="OnStateInit" @ref="dockManager">
...

</TelerikDockManager>
<TelerikButton Icon="SvgIcon.ArrowRotateCcw" OnClick="ResetState">Reset page layout</TelerikButton>
@code{
    public TelerikDockManager dockManager { get; set; }

    public async Task ResetState()
    {
        dockManager.SetState(null);
        //dockManager.GetState();
        //dockManager.Refresh();
        //StateHasChanged();
        await InvokeAsync(() => StateHasChanged());
    }
}

Tsvetomir
Telerik team
 answered on 01 Aug 2025
1 answer
30 views
I want to show an error if data load fails in OnInitializedAsync. I will save the message in a variable and show it in OnAfterRenderAsync or OnAfterRender.

The toast work when the page is fully loaded and I press the button
I am very open for suggestion on showing messages in another way

I have tried all the life cycle handler but in theory this should work.


public partial class TelerikTest
{
    [Inject] public IJSRuntime JsRuntime { get; set; }
    [Inject] public NavigationManager Navigation { get; set; }
    private TelerikNotification NotificationReference { get; set; }

    protected override void OnAfterRender(bool firstRender)
    {
        if (firstRender && Navigation.Uri.StartsWith("https"))
        {
            StateHasChanged();
            ShowErrorNotification();
        }
    }

    protected override async Task OnAfterRenderAsync(bool firstRender)
    {
        if (firstRender && Navigation.Uri.StartsWith("https"))
        {
            await JsRuntime.InvokeVoidAsync("console.log", "Component rendered!");
            StateHasChanged();
        }
    }
    
    private void ShowErrorNotification()
    {
        NotificationReference.Show(new NotificationModel
        {
            Text = "An error has occurred!",
            ThemeColor = ThemeConstants.Notification.ThemeColor.Error,
            Closable = true,
            CloseAfter = 20000
        });
    }
}



Dimo
Telerik team
 answered on 01 Aug 2025
1 answer
74 views
We upgraded to 9.1.1 recently and was put into production in Azure.  Immediately we started to have memory usage issues and a memory dump showed lots of event handler leaks possibly deep in the Telerik code.  We reverted back to 8.1.1 and so far are not seeing any of these eventhandler leaks from Telerik.  Just curious if this is a known issue or if others have experienced this. 
Tsvetomir
Telerik team
 answered on 31 Jul 2025
1 answer
50 views

Hi, i have a grid with row filter.

 

1. I change filter operator from the relative button

2. I edit the search field column

The grid show me the correct results.

Now if i clear the search field column, the filter operator automatically reset to the default value and not keep the settings i choose in step 1.

 

You can reply the issue with the first example in grid documentation: https://www.telerik.com/blazor-ui/documentation/components/grid/overview

The filter operator must keep my initial settings

It's a bug? how to solve?

Thanks

Dimo
Telerik team
 answered on 28 Jul 2025
1 answer
28 views

I just get a spinning wheel when I bring up NuGet Package Manager and have the source set to Telerik.

If I select other package sources they load and display quickly.

Any suggestions?

 

 

Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
 answered on 24 Jul 2025
1 answer
54 views

I’m trying to build a custom filter for a column in the Telerik Grid. I’d like to have both the custom filter and the default filter available in the column's filter menu. I’ve managed to get the custom filter displaying and working correctly, but the default filter is not appearing in the filter menu for that column. I’ve attached the code — could you please help me figure out what’s missing or incorrect?

Many Thanks

                                        <GridColumn Field="@nameof(StockVehicleRowDTO.PerformanceGrading)" 
                                            Title="Grade" 
                                            Lockable="true" 
                                            TextAlign="@ColumnTextAlign.Center" 
                                            Locked="true" 
                                            Width="120px" 
                                            Filterable="true">
                                            <FilterMenuTemplate Context="context">
                                                <div class="p-2">

                                                    <!-- Default Telerik Filter Menu -->
                                                    <TelerikGridFilterMenu Context="context" />

                                                    <hr />

                                                    <!-- Custom Checkbox Filter -->
                                                    <div>
                                                        <strong>Quick Grade Filter:</strong>
                                                        @foreach (var grade in GradeFilterOptions)
                                                        {
                                                            <div>
                                                                <TelerikCheckBox 
                                                                    Value="@(IsGradeChecked(context.FilterDescriptor, grade))"
                                                                    ValueChanged="@((bool value) => OnGradeFilterChanged(value, grade, context.FilterDescriptor))"
                                                                    Id="@($"grade_{grade}")">
                                                                </TelerikCheckBox>
                                                                <label for="@($"grade_{grade}")">@grade</label>
                                                            </div>
                                                        }
                                                    </div>
                                                </div>

                                            </FilterMenuTemplate>
                                            <Template>
                                                @{
                                                    var vehicleRow = (context as DDD.Application.Vehicles.ViewModels.StockVehicleRowDTO);
                                                    var grade = vehicleRow?.PerformanceGrading;
                                                }
                                                <GradeChip Grade="@grade" />
                                            </Template>
                                        </GridColumn>

 

Backend code..

 // Grade filter options for the filter menu (dynamic from data)
 public List<string> GradeFilterOptions => StockPageVehicles?.ActiveVehicles
     .Select(v => v.PerformanceGrading)
     .Distinct()
     .OrderBy(g => g)
     .Select(g => g.ToString())
     .ToList() ?? new List<string>();

 // Helper to check if a grade is selected in the filter descriptor
 public bool IsGradeChecked(CompositeFilterDescriptor filterDescriptor, string grade)
 {
     return filterDescriptor.FilterDescriptors.Any(f => (f as FilterDescriptor)?.Value?.ToString() == grade);
 }

 // Handler for checkbox changes in the Grade filter menu
 public void OnGradeFilterChanged(bool value, string grade, CompositeFilterDescriptor filterDescriptor)
 {
     var filter = filterDescriptor.FilterDescriptors.FirstOrDefault(f => (f as FilterDescriptor)?.Value?.ToString() == grade);
     filterDescriptor.LogicalOperator = FilterCompositionLogicalOperator.Or;
     int gradeInt;
     if (!int.TryParse(grade, out gradeInt)) return;
     if (value && filter == null)
     {
         filterDescriptor.FilterDescriptors.Add(new FilterDescriptor(nameof(StockVehicleRowDTO.PerformanceGrading), FilterOperator.IsEqualTo, gradeInt));
     }
     else if (!value && filter != null)
     {
         filterDescriptor.FilterDescriptors.Remove(filter);
     }
 }
Ivan Danchev
Telerik team
 answered on 22 Jul 2025
1 answer
37 views

Hi,

I've some TelerikCard components that host different other components but when using lets say the TelerikTimePicker then as soon as you try to input a time via keyboard it gets a red border and seems to invalidate the input.

When using the TelerikTimePicker outside in a simple div then it seems to work.

Also when using the popup to set the time it works. Only keyboard input seems to trigger some sort of validation.
When losing focus the timepicker resets to 00:00:00.

Here's the code of the razor page to replicate the problem:

<TelerikCard Width="20rem">
    <CardHeader>
        <CardTitle>Time Selector</CardTitle>
    </CardHeader>
    <CardBody>
        Startzeitpunkt<br>
        <TelerikTimePicker @bind-Value="@SelectedStartTime" Format="HH:mm:ss" Width="6rem" />
        <br>
        Endzeitpunkt<br>
        <TelerikTimePicker @bind-Value="@SelectedEndTime" Format="HH:mm:ss" Width="6rem" />
        <br>
    </CardBody>
    <CardSeparator></CardSeparator>
    <CardFooter>
        footer
    </CardFooter>
</TelerikCard>

@code {
    protected DateTime SelectedStartTime { get; set; }
    protected DateTime SelectedEndTime { get; set; }
}

I use the latest telerik blazor components 9.1.0 and VS 2022 17.14.9.

Maybe someone has a hint what's wrong with it.

Regards,
Thomas

Georgi
Telerik team
 answered on 18 Jul 2025
4 answers
922 views
Hi all,
I have case where grid must have external filters and filtering occurs by manual button click.
I am trying to use snippet from documentation (https://docs.telerik.com/blazor-ui/components/grid/manual-operations).

01.<TelerikTextBox @bind-Value="FilterName"/>
02.<TelerikTextBox @bind-Value="FilterEmail" />
03. 
04.<TelerikButton OnClick="Filter">Filter</TelerikButton>
05. 
06.<TelerikGrid Data=@GridData TotalCount=@Total Sortable=true Pageable=true>
07.    <TelerikGridColumns>
08.        <TelerikGridColumn Field="@nameof(Model.Name)" />
09.        <TelerikGridColumn Field="@nameof(Model.Email)" />
10.    </TelerikGridColumns>
11. 
12.    <TelerikGridEvents>
13.        <EventsManager OnRead=ReadData />
14.    </TelerikGridEvents>
15.</TelerikGrid>
16. 
17.@code{
18.    public IQueryable<Model> SourceData { get; set; }
19.    public IEnumerable<Model> GridData { get; set; }
20.    public int Total { get; set; }
21. 
22.    public string FilterName { get; set; }
23.    public string FilterEmail { get; set; }
24. 
25.    protected async Task ReadData(GridReadEventArgs args)
26.    {
27.        // Adding external filter values to grid data source request
28.        args.Request.Filters.Clear();
29.        args.Request.Filters.Add(new FilterDescriptor(nameof(Model.Name), FilterOperator.Contains, FilterName));
30.        args.Request.Filters.Add(new FilterDescriptor(nameof(Model.Email), FilterOperator.Contains, FilterEmail));
31. 
32.        var datasourceResult = await SourceData.ToDataSourceResultAsync(args.Request);
33.        GridData = (datasourceResult.Data as IEnumerable<Model>).ToList();
34.        Total = datasourceResult.Total;
35. 
36.        StateHasChanged();
37.    }
38. 
39.    protected void Filter()
40.    {
41.        // How to say to grid data source that he must read the data?
42.    }
43.     
44.    public class Model
45.    {
46.        public string Name { get; set; }
47.        public string Email { get; set; }
48.    }
49.}


I have some queations:
1. First of all, how to manually trigger Read event? Like in Kendo UI, Datasource have method read() (https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/methods/read)
In other words, in Filter() handler how to say to grid data source that he must read the data?
2. What is right way to apply external filters and manually filtering?
Flavio
Top achievements
Rank 1
Iron
 answered on 17 Jul 2025
1 answer
57 views

I'm looking for something similar to this:

https://www.syncfusion.com/blazor-components/blazor-image-editor

Need this for annotating and editing both bitmapped and vector based graphics related to an engineering applcation.

Hristian Stefanov
Telerik team
 answered on 17 Jul 2025
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?