Telerik Forums
UI for Blazor Forum
1 answer
109 views

Hello! I want to create a Blazor WebAssembly application with the following program structure: When clicking on menu items, I'd like tabs to be generated with the displayed Page Name and a close button in the tab header, and the page content displayed in the tab body. How should I structure this?

  1. Menu
  2. Tab header - Display of the clicked Page Name and a close button
  3. Tab body - Display of Page Content

Hristian Stefanov
Telerik team
 answered on 11 Jul 2024
0 answers
80 views

Hello,

I have encountered a strange bug regarding FilterDescriptor based on an Enum value.

We get an automatic conversion from int32 to int16 as soon as the filter for enum is set and then the culture of a program has been changed. For example from english to german.
After the culture has been changed, the enum filter that was previously set on TelerikGrid throws a cast exception as soon as we try to open it.

We have fixed the problem by manually converting back from short to int, since we don't use short in our filter. However it would be great if the bug could be patched :)

Tadas
Top achievements
Rank 1
 asked on 09 Jul 2024
0 answers
136 views

Hi,
I saw that this feature https://feedback.telerik.com/blazor/1561874-filter-value-template is in status Completed and Release 2024 Q2 (May) .

I did update the Telerik library but still the

  <ValueTemplate> is not recognized from visual studio.

I saw the example with :
@using Telerik.DataSource
@using Telerik.DataSource.Extensions

<TelerikFilter Value="@FilterValue" ValueChanged="@OnValueChanged">
    <FilterFields>
        <FilterField Name="@(nameof(Food.Id))" Type="@(typeof(int))" Label="Id" />
        <FilterField Name="@(nameof(Food.Name))" Type="@(typeof(string))" Label="Name">
            <ValueTemplate>
                <TelerikAutoComplete Data="@Suggestions"
                                     Value="@((string)context.FilterDescriptor.Value)"
                                     ValueChanged="@((string value) => OnFilterValueChanged(context.FilterDescriptor, value))">
                </TelerikAutoComplete>
            </ValueTemplate>
        </FilterField>
        <FilterField Name="@(nameof(Food.Price))" Type="@(typeof(decimal))" Label="Price">
            <ValueTemplate>
                <TelerikNumericTextBox Value="@((decimal?)context.FilterDescriptor.Value)"
                                       Format="C"
                                       Step="0.01m"
                                       ValueChanged="@( (decimal? value) => NumericValueChanged(context.FilterDescriptor, value) )">
                </TelerikNumericTextBox>
            </ValueTemplate>
        </FilterField>
        <FilterField Name="@(nameof(Food.IsAvailable))" Type="@(typeof(bool))" Label="Is Available" />
    </FilterFields>
</TelerikFilter>

In my scenario I want to add a Dropdown as ValueTemplate. I have the Telerik.UI.for.Blazor version 6.0.2. Is the ValuteTemplate included in this version?

 

Thanks in advance.

                                                      
Sua
Top achievements
Rank 1
 asked on 08 Jul 2024
1 answer
154 views

I loaded the demos Blaxor app and I am getting all kinds of errors because the Telerik packages do not exist. They don't exist on Nuget.org (the Trial versions) and the app has no reference to any Telerik feed server. I expected that a package feed server to be defined. I want to load the project and run and expect it to run and not spend over an hour trying to fix stuff! The packages exist in my more than one folder and I don't understand why they are not centralized in one folder.


The Microsoft packages reference 8.0.0 instead of the latest. Azure.Identity is referencing 1.11 and for some reason Visual Studio is refusing to load it. It's showing a moderate vulnerability so I upgraded to 1.12. It makes feel the demos haven't been upgraded in months.

Now I am getting these errors and it's not clear why.

(insert image in this text editor doesn't support inserting an image from my computer.  Forcing me to enter a tag. Can't find demos tag, Not friendly UX)

 

 

Dimo
Telerik team
 answered on 08 Jul 2024
1 answer
108 views
In a popup edit form inside a grid is it possible to override the columns setting for specific fields?
I have set up a grid popup edit form with 4 columns.  One of the fields is too big for 1 column and I would like to have it display over 2 columns.  
Is there a method like ColSpan for a popup edit form? Or is there a way to make it work?
Tsvetomir
Telerik team
 answered on 08 Jul 2024
1 answer
99 views
@using  System.Threading
@using Telerik.Blazor.Components

@inject NavigationManager NavigationManager

<div>
    <TelerikDropDownList Data="@Cultures"
                         @bind-Value="@SelectedCulture"
                         Width="200px"
                         TextField="@nameof(CultureData.Text)"
                         ValueField="@nameof(CultureData.Value)"
                         DefaultText="Select a language">
            <DropDownListSettings>
                <DropDownListPopupSettings Height="auto"></DropDownListPopupSettings>
            </DropDownListSettings>
    </TelerikDropDownList>
</div>

@code{
    public class CultureData
    {
        public string Text { get; set; }
        public string Value { get; set; }
    }

    public List<CultureData> Cultures { get; set; } = new List<CultureData>()
    {
        new  CultureData() { Text = "English", Value = "en-US" },
        new  CultureData() { Text = "German", Value = "de-CH" },
    };

    public string SelectedCulture { get; set; } = Thread.CurrentThread.CurrentUICulture.Name;

    protected override void OnInitialized()
    {
        if (Cultures.All(c => c.Value != SelectedCulture))
        {
            SelectedCulture = Cultures.First().Value;
        }
    }

    public void OnValueChanged(string eventArgs)
    {
        SelectedCulture = eventArgs;

        SetCulture(eventArgs);
    }

    public void SetCulture(string culture)
    {
        var uri = new Uri(NavigationManager.Uri).GetComponents(UriComponents.PathAndQuery, UriFormat.Unescaped);
        var query = $"?culture={Uri.EscapeDataString(culture)}&redirectUri={Uri.EscapeDataString(uri)}";

        NavigationManager.NavigateTo($"{NavigationManager.BaseUri}Culture/SetCulture{query}", forceLoad: true);
    }
}
Nadezhda Tacheva
Telerik team
 answered on 05 Jul 2024
1 answer
145 views

Hi,

I use TelerikMaskedTextBox with IncludeLiterals, but the value is always padded with spaces to the mask's length. Is there a way to trim the value? For example, if I have a partially filled phone mask, I can't determine whether it is valid based on the length. Also, when stored in the database, having those spaces can be an issue when used by another method in the application.

Thanks,

Tsvetomir
Telerik team
 answered on 05 Jul 2024
1 answer
137 views
When using a grid in `GridEditMode.Inline`, the first column is always focused for editing.  I need the second column to always be when beginning to insert or edit a row.  How can this be achieved?
Tsvetomir
Telerik team
 answered on 05 Jul 2024
0 answers
239 views

The FileManager breadcrumb links for previous folders don't seem to work like I would expect. Instead of opening the folder that was clicked on, it appears that the breadcrumb link leads to "#".

Is there some kind of configuration that I'm missing?

I attached my example source code which the issue. Please help to take a look and advise!

Thank you so much for your help!

Hang
Top achievements
Rank 1
 asked on 05 Jul 2024
1 answer
242 views

Could you please provide an actual implementation (not just a dummy implementation) of how to download a file with the FileManager (FlatFileService only)?

Specifically, how do you read for example a .pdf file into a stream within the DownloadAsync(FileManagerDownloadEventArgs args) method?

My problem is that everytime I call something like File.ReadAllBytes(item.Path), it halts unexpectedly and does not continue the processing, thus leaving me in a loading loop.

 

Cheers!

Dimo
Telerik team
 answered on 04 Jul 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?