Telerik Forums
UI for Blazor Forum
1 answer
62 views

I have a grid and I want to present the user with a set of custom actions for each specific row. I am using the splitbutton control in the gridcolumn template. The grid and splitbutton renders but the splitbutton popup is not visible.

https://blazorrepl.telerik.com/mykXmBPX33zR9mDO27

<TelerikGrid Data="@data">
    <GridColumns>
        <GridColumn>
            <Template>
                <TelerikSplitButton Icon="@SvgIcon.FileExcel">
                    <SplitButtonContent />
                    <SplitButtonItems>
                        <SplitButtonItem Icon="@SvgIcon.FilePdf" />
                        <SplitButtonItem Icon="@SvgIcon.DataJson" />
                    </SplitButtonItems>
                </TelerikSplitButton>
            </Template>
        </GridColumn>
        <GridColumn Field="@nameof(Data.field)" />
    </GridColumns>
</TelerikGrid>

@code {
    class Data
    {
        public string field{ get; set; }
    }

    IEnumerable<Data> data = Enumerable.Range(0, 10).Select(x => new Data { field = x.ToString() });
}

Hristian Stefanov
Telerik team
 answered on 29 Sep 2024
0 answers
74 views

I'm using an editor to capture rich text to add to the database. After I add it, I clear the field out that is bound to the editor but the editor does not update on the page. It still has the previous values.


<TelerikEditor @ref="@AnswerEditor"
	       @bind-Value="@FaqToAdd.Answer"
	       Tools="@EditorTools"
	       EditMode="EditorEditMode.Div" 
	       Height="auto" 
	       DebounceDelay="0"
	       Width="100%">
</TelerikEditor>

Michael
Top achievements
Rank 1
 asked on 27 Sep 2024
1 answer
94 views

I have a control that has a form on it.  That form has a MultiSelect control on it. The Multiselect is populated with records from a DB Table.  I have also added a button below the multiselect control that triggers a window control that allows the user to add a new record to that table.  When I close the window I would like to refresh the multiselect control without refreshing the whole form that it is part of.  How do I go about refreshing only the MultiSelect control?

  <TelerikMultiSelect @bind-Value="@AppState.Party.SelectedAssocFirmIds"
                                                TItem="AssocFirmDDL"
                                                Placeholder="Click here for existing firms or add a new one."
                                                TValue="int"
                                                ValueField="Id"
                                                TextField="Name"
                                                OnRead=@ReadAssocFirms
                                                AdaptiveMode="AdaptiveMode.Auto"
                                                Filterable="true"
                                                Id="AssocFirms"
                                                Width="90%">
                            </TelerikMultiSelect>
                            <TelerikButton Icon="SvgIcon.Plus" OnClick="@(()=>AssocFirmWindowIsVisible=!AssocFirmWindowIsVisible)">Add New Firm</TelerikButton>

  private async Task ReadAssocFirms(MultiSelectReadEventArgs args)
    {
        try
        {
            DataSourceRequest dsr = CreateDataSourceRequest();
            var assocFirms = await AssocFirmServices.GetAssocFirmsOnly(dsr);
            args.Data = mapper.Map<List<AssocFirm>, List<AssocFirmDDL>>(assocFirms.AssociatedFirms);
        }
        catch (Exception ex)
        {
            logger.LogError($"Error reading Associated firms for DDL.", ex.GetBaseException().Message);
            throw;
        }
    }


Tsvetomir
Telerik team
 answered on 27 Sep 2024
0 answers
98 views

Hello Telerik Community,

I'm currently working on a Blazor application using the Telerik UI components, and I've run into an issue regarding the default validation behavior of the DateInput component. By default, the DateInput performs validation that sometimes interferes with my application's requirements.

Problem Description

When using the DateInput component, I noticed that it automatically validates the entered date and displays validation messages if the input does not conform to expected formats or ranges. However, I need to customize this behavior and allow users to enter dates without triggering these default validation checks.

Steps Taken

I've explored various approaches, including:

  1. Custom Validation Attributes: Attempted to apply custom validation attributes to override the default behavior.
  2. Disabling Validation: Looked for properties or methods to disable validation directly within the DateInput component.
  3. Event Handling: Tried handling the OnBlur and OnChange events to manage validation manually.

Questions

  1. Is there a built-in way to disable the default validation for the DateInput component?
  2. If so, what properties or methods should I utilize to achieve this?
  3. Are there best practices for implementing custom validation for the DateInput that you would recommend?
Harsh
Top achievements
Rank 1
 asked on 26 Sep 2024
1 answer
73 views

I see kendo Map UI demo like following and looking into source code, in there it's supporting events like "shapeMouseEnter", "shapeMouseLeave", etc.
https://demos.telerik.com/kendo-ui/html5-dashboard-sample-app

On shape mouse enter or leave, it's setting hover color on region. Also, on click on shape, it's also setting background color of shape as well as doing some data filter logic.

I am using Telerik Blazor, and my requirements are the same. I wanted to use shapeMouseEnter and shapeMouseLeave to highlight country. Also wanted to change its color when shape is clicked.

Can you guide me on how to achieve same behavior with Telerik Blazor component?

 

 

Tsvetomir
Telerik team
 answered on 26 Sep 2024
1 answer
109 views

I have a very simple scenario with a TelerikDropDownList, like the following:

<TelerikDropDownList Data="@foundComponents"
		     @bind-Value="@componentId"
		     ValueField="ComponentId"
		     TextField="Description">
</TelerikDropDownList>

Then, I have declared the required properties and then there is my method that loads the data in the "foundComponents" collection.

@code {
     protected string? componentId;
     protected IEnumerable<Component>? foundComponents;

     ...

     private async Task SearchComponentAsyncHandler()
     {
          foundComponents = (await JsonSerializer.DeserializeAsync<ZollerBrowseResult>(responseStream)).BrowseResult?.Select(x => x.Component);
     }
}

and this is my "ZollerBrowseResult" model and its related classes:

public class ZollerBrowseResult
{
	public required BrowseResult[]? BrowseResult { get; set; }
}

public class BrowseResult
{
	public required Component Component { get; set; }
}

public class Component
{
	public string? ComponentId { get; set; }
	[JsonPropertyName("Component.ComponentId")]
	private string Component_ComponentId { set { ComponentId = value; } }
	public string? Description { get; set; }
	public Article? Article { get; set; }
}

For some reason, when I run the application, the Dropdown doesn't show the Description property, it shows the class FullName instead.

 

I don't understand what I am doing wrong here.

Lorenzo
Top achievements
Rank 1
Iron
 answered on 25 Sep 2024
0 answers
55 views
I am having to do an analysis on the website I am building using your controls and found that the popover control cannot be triggered using the keyboard only (it must be triggered using mouse events, hover or click).  Are there any plans to adjust the functionality of this control to bring it into WCAG compliance?
Rick
Top achievements
Rank 2
Iron
Iron
 asked on 24 Sep 2024
0 answers
84 views

Hi, 

I am encountering an issue with the Telerik Grid in our Blazor project. Specifically, when there is only one record on the second page of the grid, and I delete that record, the grid does not automatically jump back to the first page, even after refreshing the grid.

Steps to Reproduce:

  1. Navigate to a grid with multiple pages.
  2. Ensure there is only one record on the second page.
  3. Delete that record.
  4. Observe that the grid does not return to the first page

I would appreciate any guidance on how to resolve this issue or if there are any workarounds you could recommend.

Thank you for your assistance!

Oliver
Top achievements
Rank 1
 asked on 24 Sep 2024
1 answer
196 views

Hello,

how can a tooltip be displayed on a disabled button?

I have a use case where the user should be informed of the reason for the disabled button through the tooltip.

Thank you in advance!

https://blazorrepl.telerik.com/GoENGaYV59uuC3IQ44

Tsvetomir
Telerik team
 answered on 20 Sep 2024
1 answer
52 views

Hi.

I have a requirement I'm stumped with. I want to get the folder name when click on the tree view. I found that Telerik has SelectedItemsChanged but it only works for the files/folders on content view.

I can't think of any way to do this - is it possible?

Thanks,

Hang Pham

Dimo
Telerik team
 answered on 20 Sep 2024
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?