<TelerikGrid Data="categories" Pageable="true" PageSize="5" Class="custom-nested-grid">
<DetailTemplate Context="categoryItem">
@{
var category = categoryItem as CategoryModel;
<TelerikGrid Data="category.SubItems" Pageable="true" PageSize="3" Class="nested-grid">
<DetailTemplate Context="subItem">
@{
var nestedItem = subItem as SubItemModel;
<TelerikGrid Data="nestedItem.NestedItems" Pageable="true" PageSize="3" Class="nested-grid">
<DetailTemplate Context="nestedSubItem">
@{
// Add a fourth level of nesting here if needed
}
</DetailTemplate>
<GridColumns>
<GridColumn Field="Code" Title="Code"></GridColumn>
<GridColumn Field="Name" Title="Name"></GridColumn>
<GridColumn Field="Description" Title="Description"></GridColumn>
<GridColumn Field="ItemType" Title="Item Type"></GridColumn>
<GridColumn Field="LinkedCategories" Title="Linked Categories"></GridColumn>
</GridColumns>
</TelerikGrid>
}
</DetailTemplate>
<GridColumns>
<GridColumn Field="Code" Title="Code"></GridColumn>
<GridColumn Field="Name" Title="Name"></GridColumn>
<GridColumn Field="Description" Title="Description"></GridColumn>
<GridColumn Field="ItemType" Title="Item Type"></GridColumn>
<GridColumn Field="LinkedCategories" Title="Linked Categories"></GridColumn>
</GridColumns>
</TelerikGrid>
}
</DetailTemplate>
<GridColumns>
<GridColumn Field="Code" Title="Code"></GridColumn>
<GridColumn Field="Name" Title="Name"></GridColumn>
<GridColumn Field="Description" Title="Description"></GridColumn>
<GridColumn Field="ItemType" Title="Item Type"></GridColumn>
<GridColumn Field="LinkedCategories" Title="Linked Categories"></GridColumn>
</GridColumns>
</TelerikGrid>
@code {
// Sample data model classes
public class CategoryModel
{
public string Code { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string ItemType { get; set; }
public string LinkedCategories { get; set; }
public List<SubItemModel> SubItems { get; set; }
}
public class SubItemModel
{
public string Code { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string ItemType { get; set; }
public string LinkedCategories { get; set; }
public List<NestedItemModel> NestedItems { get; set; }
}
public class NestedItemModel
{
public string Code { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string ItemType { get; set; }
public string LinkedCategories { get; set; }
// Add this property to support further nesting
public List<NestedItemModel> NestedItems { get; set; } = new List<NestedItemModel>();
}
private List<CategoryModel> categories = new List<CategoryModel>
{
new CategoryModel
{
Code = "C-1", Name = "Ram Pro Master 2500", Description = "Ambulance parts for ram pro master 2500", ItemType = "Parts", LinkedCategories = "8 Linked categories",
SubItems = new List<SubItemModel>
{
new SubItemModel
{
Code = "C-134", Name = "Electronic Control Unit", Description = "Electric parts for ram pro master 3500", ItemType = "-", LinkedCategories = "4 Linked categories",
NestedItems = new List<NestedItemModel>
{
new NestedItemModel
{
Code = "N-1", Name = "Subcomponent A", Description = "Details for subcomponent A", ItemType = "Electronic", LinkedCategories = "2 Linked categories",
// Next level of data
NestedItems = new List<NestedItemModel>
{
new NestedItemModel { Code = "L-1", Name = "Detail A1", Description = "Details of A1", ItemType = "Part", LinkedCategories = "-",
NestedItems = new List<NestedItemModel>
{
new NestedItemModel { Code = "L-1", Name = "Detail A1", Description = "Details of A1", ItemType = "Part", LinkedCategories = "-" },
new NestedItemModel { Code = "L-2", Name = "Detail A2", Description = "Details of A2", ItemType = "Part", LinkedCategories = "Linked" }
}
},
new NestedItemModel { Code = "L-2", Name = "Detail A2", Description = "Details of A2", ItemType = "Part", LinkedCategories = "Linked" }
}
},
new NestedItemModel
{
Code = "N-2", Name = "Subcomponent B", Description = "Details for subcomponent B", ItemType = "Electronic", LinkedCategories = "1 Linked category",
NestedItems = new List<NestedItemModel>
{
new NestedItemModel { Code = "L-3", Name = "Detail B1", Description = "Details of B1", ItemType = "Part", LinkedCategories = "-" }
}
}
}
}
}
},
new CategoryModel
{
Code = "C-2", Name = "Ram Pro Master 3500", Description = "Electric parts for ram pro master 3500", ItemType = "Parts", LinkedCategories = "5 Linked categories",
SubItems = new List<SubItemModel>
{
new SubItemModel
{
Code = "C-672", Name = "Engine Control Unit", Description = "Engine module for control", ItemType = "-", LinkedCategories = "3 Linked categories",
NestedItems = new List<NestedItemModel>
{
new NestedItemModel
{
Code = "N-3", Name = "Engine Subcomponent A", Description = "Engine details A", ItemType = "Engine Part", LinkedCategories = "-",
NestedItems = new List<NestedItemModel>
{
new NestedItemModel { Code = "L-4", Name = "Detail C1", Description = "Details of C1", ItemType = "Control Unit", LinkedCategories = "-" },
new NestedItemModel { Code = "L-5", Name = "Detail C2", Description = "Details of C2", ItemType = "Control Unit", LinkedCategories = "Linked" }
}
}
}
}
}
}
};
private void ApplyCategory(CategoryModel category)
{
Console.WriteLine($"Applying category: {category.Code}");
}
private void ApplySubItem(CategoryModel category, SubItemModel subItem)
{
Console.WriteLine($"Applying sub-item: {subItem.Code} under category: {category.Code}");
}
private TelerikGrid<CategoryModel> gridRef;
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await JSRuntime.InvokeVoidAsync("setHierarchyCellWidth", 130); // Set the desired width here
}
}
}
<script>
window.setHierarchyCellWidth = function(width) {
document.querySelectorAll(".k-hierarchy-cell").forEach(cell => {
cell.style.width = width + "px";
cell.style.minWidth = width + "px";
cell.style.maxWidth = width + "px";
});
}
</script>
Is there a way to set the value attribute for a submit button when using the TelerikButton.
For example, this is the button markup I am currently using:
<button type="submit" class="login100-form-btn" name="provider" value="@provider.Name"
title="Log in using your @provider.DisplayName account">
<TelerikSvgIcon Icon="@GetExternalIcon(provider.Name)" Size="@ThemeConstants.SvgIcon.Size.ExtraExtraLarge" Class="me-3" />
Login using @provider.DisplayName
</button>


I have a requirement to conditionally disable all controls in a TelerikForm. There a multiple ways to do that but what seems like the easiest to me is to wrap the form as such:
<fieldset disabled>
<TelerikForm>...
</fieldset>
I have buttons, text boxes, date pickers and drop down lists in my form. All of the controls get disabled except for the drop downs. Is there a simple way to do this so the drop downs will get included? I know I could do this through javascript or whatever but it just struck me as weird that most of the Telerik controls are disabled except for the drop downs.
Thanks.

Hi,
Dear Telerik Support Team,We have a type that we are trying to bind to a column chart. The chart fails to bind if the properties are decorated with JsonPropertyName attribute. Remove the attribute the data binds Ok. Is there a work around that allows us to keep the attribute decoration?
<TelerikGridLayout>
<GridLayoutColumns>
<GridLayoutColumn Width="60%"></GridLayoutColumn>
<GridLayoutColumn Width="40%"></GridLayoutColumn>
</GridLayoutColumns>
<GridLayoutItems>
<GridLayoutItem Column="2">
<TelerikChart>
<ChartSeriesItems>
<ChartSeries Type="ChartSeriesType.Column" Name="Successful" Data=transactionByDateResponse2 Field=@nameof(TransactionSummaryResponse2.SuccessfulCount) CategoryField=@nameof(TransactionSummaryResponse2.TransactionDate)>
<ChartSeriesStack Group="ChartSeriesType.Column" />
</ChartSeries>
<ChartSeries Type="ChartSeriesType.Column" Name="Failed" Data=transactionByDateResponse2 Field=@nameof(TransactionSummaryResponse2.FailedCount)>
<ChartSeriesStack Group="ChartSeriesType.Column" />
</ChartSeries>
<ChartSeries Type="ChartSeriesType.Column" Name="Vend Failed" Data=transactionByDateResponse2 Field=@nameof(TransactionSummaryResponse2.VendFailedCount)>
<ChartSeriesStack Group="ChartSeriesType.Column" />
</ChartSeries>
<ChartSeries Type="ChartSeriesType.Column" Name="Expired" Data=transactionByDateResponse2 Field=@nameof(TransactionSummaryResponse2.ExpiredCount)>
<ChartSeriesStack Group="ChartSeriesType.Column" />
</ChartSeries>
</ChartSeriesItems>
<ChartLegend Position="ChartLegendPosition.Bottom"/>
</TelerikChart>
</GridLayoutItem>
</GridLayoutItems>
</TelerikGridLayout>
namespace Poseidon.BackOffice.Blazor.Features.Transactions.Components