Telerik Forums
UI for Blazor Forum
1 answer
134 views

I tried to figure out how to use different Item Templates within a Listview but I failed.

is it not possible ?

Dimo
Telerik team
 answered on 11 Jul 2024
2 answers
138 views

Hello,

 

We are using blazor Webassembly with Telerik and its localization/globalization. Everything works fine.

Client ask us a little detail, to "translate" the mask format for date input ( TelerikDatePicker, ... ). 

For example, if we use the french culture "fr-BE"we would like to transform "dd/MM/yyyy" to "jj/MM/aaaa" (day => jour; Month => Mois; year => annĂ©e) or something similar. In Telerik UI for Angular, we have it translated =>  

 

How can we achieve that for Telerik UI for Blazor ?

Kind regards,

Quentin.

Quentin
Top achievements
Rank 1
Iron
 answered on 11 Jul 2024
1 answer
156 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
119 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
190 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
230 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
161 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
152 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
216 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
201 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?