Telerik Forums
UI for Blazor Forum
1 answer
47 views

Hi folks,

I would like to show some icon next to a column that indicates that the column can be sorted or not. I have set the Sortable="true" at the grid level and for one of the grid column the sortable is set as false.

Any suggestions on how to implement this feature?

Thanks,
Bimal 

Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
 answered on 19 Feb 2025
1 answer
57 views
Do you have any examples that show Fluent UI working in the same project with Telerik Blazor?  
Joel
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 19 Feb 2025
1 answer
59 views

I've created a custom GridColumn component with special formatting like so:

<GridColumn Field="@Field" Title="@Title" Width="@Width"><Template Context="context">

       @FormatValue(context)

   </Template>
</GridColumn>

When I place this within a <GridColumns> element (within a <TelerikGrid>) it always appears last. I'm pretty sure it's related to this issue but I don't quite follow the solution. The first one says to put the custom component directly in the grid tag. As in directly under <TelerikGrid> rather than within <GridColumns> (where I have it now)?

I having the same issue with a custom <DropDownMenuItem> component in that it always appears last no matter where I place it within the <DropDownButtonItems> in a <TelerikDropDownButton>. This isn't quite as critical because all of my button items are custom components so I can arrange them properly. But the GridColumn is mixed with other normal GridColumn components and I'd rather not have to create custom components for all of them.

Any thoughts? This is .NET 9 with Telerik UI for Blazor 7.1

Dimo
Telerik team
 answered on 19 Feb 2025
0 answers
58 views
I have a child component that I am trying to get to re-render when a new value on a combo box on the parent component is changed.  My child control is not re-rendering to reflect the value change.

This is my current code:
 <TelerikComboBox 
            @bind-Value="@SelectedId"            
            FilterOperator="@filterOperator"
            Data="@ParticipantsDDL"
            TextField="@nameof(ParticipantDDL.CodeName)"
            ValueField="@nameof(ParticipantDDL.Id)"
            Placeholder="Select/enter a participant code or name." 
            Width="40vh"
            DebounceDelay="200"
            OnChange="@OnComboValueChanged"
            Filterable="true">
        </TelerikComboBox>       
        @if (SelectedId > 0)
        {
            <PDParticipant ParticipantId="@SelectedId" />
        }        

And my Handler:
   
private void OnComboValueChanged(object newValue) { SelectedId = (int)newValue; StateHasChanged(); }
When I select a new value in the Combo box the SelectedId value changes on the parent page but I need to force the child control to re-render with the new code.  How do I force the child control to rerender with the new data?
John
Top achievements
Rank 2
Iron
Iron
Iron
 updated question on 19 Feb 2025
1 answer
74 views

Hey,

I am working on a Telerik for Blazor UI project and I'm really liking alll the Telerik features so far. However, when there are too many data points on my graph, the x axis becomes really hard to read, so I added a feature to scale the number of visible x-axis categories based on the number of intervals.

For this purpose, I was hoping to add a feature so that when one zooms into the graph, more of the x-axis intervals become visible based on how many can comfortably fit on screen. To this end, I need to know how much a user has zoomed in so that I can scale things accordingly. However, from all I can find online, there is no way to query a TelerikChart for how zoomed in you are. I might be missing something, but in case I am not, I think this feature could be very helpful so that one can add events based on the zoom in and have things change accordingly.

Thanks

Hristian Stefanov
Telerik team
 answered on 17 Feb 2025
2 answers
100 views

Hi

I'm using the TelerikMenu component with multiple nested levels of menu items. When moving the cursor from inside a nested level, to a parent level that is not in the currently selected path, the menu disappears. 

View this example on REPL: https://blazorrepl.telerik.com/mIvFOglY481u2hRG05

When moving the cursor from "Item A1 - 1" to "Item A2", the menu disappears.

 

Because I have a large menu with multiple levels, it would improve user experience to keep the menu visible as long as the cursor hovers it. Is there any way to make this happen?

 

Best regards

Bram

Bram
Top achievements
Rank 1
Iron
Iron
 answered on 17 Feb 2025
1 answer
34 views

How can I get the start and end dates that are displayed in the current view?  I understand that there is a date changed event, but that doesn't give me the entire date range of what is currently being displayed.  I'd like to use that date range to then re-query the database and only pull back the events for that specific range.  I currently can't find a way to get that information.

 

Hristian Stefanov
Telerik team
 answered on 17 Feb 2025
0 answers
31 views
Hello
I want to find the value of for example row 0 column 4 of Grid when Button is clicked.
My grid is filled with ExpandoObject.
Please help me.
Thanks
Mohamad Javad
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 16 Feb 2025
1 answer
84 views

I'm trying to read from an existing Excel file that the user will upload via FileSelect.   When it gets to the last line trying to set the workbook variable:

workbook = formatProvider.Import(selectedFile.Stream, TimeSpan.FromSeconds(30));

...I get the error, "'System.NotImplementedException' in Telerik.Zip.dll: 'Synchronous actions on the file stream is not supported by the Blazor framework in Blazor Server-side apps due to the SignalR communication between the client and the host. Use the 'ReadAsync' method instead.'"

If I try to copy the stream first like this:

await selectedFile.Stream.CopyToAsync(ms);

It never gets past that line and there is no error.

Here is my stripped code:

@page "/uploadtest"
@using Microsoft.EntityFrameworkCore
@using IGPOSCore.Models
@using Microsoft.IdentityModel.Tokens
@using Telerik.Blazor.Components
@using Telerik.Blazor.Components.FileSelect
@using System.ComponentModel
@using Telerik.Windows.Documents.Spreadsheet.FormatProviders
@using Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx
@using Telerik.Windows.Documents.Spreadsheet.Model

<TelerikFileSelect @ref="fileSelect" OnSelect="@OnFileSelected" Multiple=false />
    <TelerikButton OnClick="@(() => LoadExcelFile())" >
        Upload
    </TelerikButton>

@code {
    private TelerikFileSelect? fileSelect { get; set; }
    private FileSelectFileInfo? selectedFile { get; set; }
    private Workbook? workbook { get; set; }

    private async Task OnFileSelected(FileSelectEventArgs args)
    {
        if (args.Files != null && args.Files.Any())
        {
            selectedFile = args.Files.First();
        }
    }

    public async Task LoadExcelFile()
    {
        Guid submissionId = Guid.NewGuid();

        if (selectedFile != null)
        {
            Console.WriteLine($"Processing file: {selectedFile.Name} - {selectedFile.Size} bytes");

            IWorkbookFormatProvider formatProvider = new XlsxFormatProvider();
            @* var ms = new MemoryStream();
            await selectedFile.Stream.CopyToAsync(ms);
            workbook = formatProvider.Import(ms, TimeSpan.FromSeconds(30)); *@
            workbook = formatProvider.Import(selectedFile.Stream, TimeSpan.FromSeconds(30));
            
        }
    }
}


Dimo
Telerik team
 answered on 14 Feb 2025
1 answer
40 views

When using the Data Grid with row virtualization we set a pagesize large enough so with normal usage you almost never see the rows loading when scrolling downwards. However when scrolling upwards rows always need to be loaded. The pagesize only affects the items loaded downwards.

From a user experience this is counterintuitive because the rows are visible when first opening the grid, but after scrolling down and back up the rows now need to be loaded again.

Is there a way to have items preloaded in both directions so we always get a smooth user experience?

Tsvetomir
Telerik team
 answered on 12 Feb 2025
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?