ToolBarItemBase exposes Class and other Parameters via it's inheritance, but dosn't implement them. This causes problems when you want to for example add Class="k-grow" in the ToolBarTemplateItem and TelerikTextBox to make if swell and fill the toolbars remaining space.
Sample Code:
@page "/home"
<TelerikToolBar>
<ToolBarTemplateItem Class="This-Class-Is-Not-Rendeder-In-Browser-DOM">
<TelerikTextBox Class="This-Class-Works-Fine" />
</ToolBarTemplateItem>
</TelerikToolBar>
DOM:
<main class="main" b-29r974uz1l="">
<div class="k-toolbar telerik-blazor k-toolbar-resizable k-toolbar-md" role="toolbar"
data-id="e665969e-a55f-4bb1-8503-427f659bc6ab" dir="ltr">
<div class="k-toolbar-item" tabindex="0">
<span class="k-textbox k-input This-Class-Works-Fine telerik-blazor k-input-solid k-rounded-md k-input-md">
<input role="textbox" id="8152979c-ef9b-47f2-9315-acdc5fb5ac38"
data-id="a24df6d2-8ce8-4ee3-bd68-3d27283b8bfd" class="k-input-inner" dir="ltr" aria-readonly="false"
tabindex="0">
</span>
</div>
<button
class="telerik-blazor k-button k-toolbar-overflow-button k-hidden k-button-flat k-rounded-md k-button-md k-button-flat-base k-icon-button"
data-id="1aeae0a0-1a66-404e-914d-2cd4ddba222d" dir="ltr" tabindex="-1" title="More tools"
aria-disabled="false" type="button">
<span class="telerik-blazor k-button-icon k-icon k-svg-icon k-svg-i-more-vertical" aria-hidden="true">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512">
<path
d="M240 128c26.4 0 48-21.6 48-48s-21.6-48-48-48-48 21.6-48 48 21.6 48 48 48m0 64c-26.4 0-48 21.6-48 48s21.6 48 48 48 48-21.6 48-48-21.6-48-48-48m0 160c-26.4 0-48 21.6-48 48s21.6 48 48 48 48-21.6 48-48-21.6-48-48-48">
</path>
</svg>
</span>
</button>
</div>
</main>
ToolBarTemplateItem.razor from your source code dosn't seem to have any actual implementation for this in the razor file, nor do I see any BuildRenderTree functions in any of the inhertied classes. I assume this is the problem. Or am I missing something?
@namespace Telerik.Blazor.Components @inherits ToolBarItemBase
Hello
I want to write a desired text instead of calendar numbers.
For example, as specified in the attached file, I want to write the desired text (8 day of month) instead of the number 8.
I tried through the event:
OnCalendarCellRender="@OnCalendarCellRenderHandler"
but I did not get the result.
Please help me.
Going back to 2020 threads I researched and there is still no way I can tell for easily hiding a GridCommandButton (even when using context)?
What is odd, the "ShowInEdit" will indeed hide the GridCommandButton if row selected and in edit mode ... so it seems you folks have a way to control visibility but no property for it?
So I'm assuming after 4 years of Blazor UI support, a "visibility" property will NOT happen?
Currently this is what I use to "Enable" a GridCommandButton but that's not really what I want to do, I don't want to show it.
<GridCommandColumn Context="bookingEquipmentDeleteCommandContext" Width="8rem">
@{
var equipment = bookingEquipmentDeleteCommandContext as BookingEquipmentModel;
}
<GridCommandButton Command="Delete" OnClick="@EquipmentDeleteCommandHandler" Class="btn-red" Icon="@FontIcon.Trash" Enabled="@(string.IsNullOrEmpty(equipment?.EquipmentCode))" ShowInEdit="false">Delete</GridCommandButton>
</GridCommandColumn>
I would think something as simple as "Visible" would be easy to implement, especially now that we're on version 7 on the control suite?
Rob.
I am trying to clear all selected values from a TelerikRadioGroup. I would like to do this by clicking on the selected value. The problem is the OnChange and the ValueChanged does not fire unless you are clicking on a different value.
<TelerikRadioGroup Data="@genderOptions"
Value="@selectedGender"
OnChange="@OnChangeHandler"
ValueChanged="@((int newValue) => OnGenderChanged(newValue))"
ValueField="@nameof(GenderModel.GenderId)"
TextField="@nameof(GenderModel.GenderText)"
Layout="RadioGroupLayout.Horizontal">
</TelerikRadioGroup>
@code {
private int selectedGender;
private void OnGenderChanged(int newValue)
{
if (selectedGender == newValue)
{
var aa = 123;
}
else
{
selectedGender = newValue;
Console.WriteLine($"Gender changed to: {newValue}");
}
}
async Task OnChangeHandler(object newValue)
{
// the handler receives an object that you may need to cast to the type of the component
// if you do not provide a Value, you must provide the Type parameter to the component
Console.WriteLine($"ValueChanged fired with value: {newValue as string}");
}
}
Dear Telerik Support team,
as of version 7.1.0 the No Data Template was introduced for Charts and I was wondering, if there's any chance to prevent the chart of rendering the no data template, when none is defined and needed.
In my case I'd rather display an empty chart, instead of the no data template.
Any way to accomplish that?
Many thanks!
Thomas
We have a legacy ASP.NET Core MVC app and are migrating it to Blazor Interactive Server one view/page at a time. We have Blazor Interactive Razor Components in a MVC Razor View working. What is the guidance on the TelerikRootComponent in this scenario? There is no Blazor interactive layout file to place it in w/ this use case.
<div class="alert alert-dark" role="alert">
This is an ASP.NET Core MVC Razor View/Page.
</div>
<div class="card">
<div class="card-header">
Blazor Interactive Server Component
</div>
<div class="card-body">
<component type="typeof(MyWeb.Components.Tests.Test)" render-mode="ServerPrerendered" />
</div>
</div>
Hi, I am wondering if anyone has attempted this before and if it's possible. I have a use case where a user can click on a grid to expand details about that row, which shows as another grid. For example, in the image I have, I expand this row, and it shows a new grid below.
When I choose export, I want to be able to export the rows I'm viewing as usual, but underneath each of those rows I want to also include the sub-grid rows.
So for example, if an object has two sub-items in its sub-grid, the export for two objects would look like:
Object 1
Sub Item 1
Sub Item 2
Object 2
Sub Item 1
Sub item 2
I'm assuming I have to do something under OnBeforeExcelExport to stage this, but how would I go about doing it? I have no idea what the syntax in this case should look like (as a matter of fact I don't quite understand what's going on in the default version of the method).
Any help is appreciated!
Hello
I want to display the desired text in the DatePicker after selecting the date from TelerikDatePicker.
Currently, after selecting the DatePicker, the date is displayed in this field, to which I want to add the desired text.
For example, in the DatePicker field after selecting the date, instead of
07/01/2025
, today is 07/01/2025.
If it is not possible to change the text, at least no text should be displayed in the DatePicker after selecting the date.
Please help me.
Code and image:
<TelerikDatePicker @bind-Value="DatePickerValue" >
</TelerikDatePicker>
@code {
private DateTime DatePickerValue { get; set; } = DateTime.Today;
{