Telerik Forums
UI for Blazor Forum
1 answer
190 views
Do you have any examples that show Fluent UI working in the same project with Telerik Blazor?  
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
 answered on 19 Feb 2025
1 answer
146 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
156 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
2 answers
191 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
80 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
84 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
227 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
98 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
1 answer
153 views

Any ideas on how to make the width of the column on the timeline smaller?   

 

 

I can make the text smaller by updating this css.

 .k-gantt .k-table-td

 

However, I cannot figure out the right combination to adjust for column widths on the time line side.

Tsvetomir
Telerik team
 answered on 12 Feb 2025
1 answer
86 views
How do I add a new row to the GridLayout through code?  Then, I'll need to add a new GridLayoutItem to the new row.  Then, I need to add a custom component to that GridLayoutItem.
Hristian Stefanov
Telerik team
 answered on 06 Feb 2025
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?