I receive from other developer workable application with Blazor and Telerik UI. I have installed Telerik UI successfully to my machine, then install package Telerik.UI.for.Blazor.Trial. Site successfully compiled and started. But Blazor UI don't working.
Can i use Panelbar ContentTemplate as a dynamic template in a view?
Example: i want different ContentTemplate to render depending on a property.value?
code is from Telerik's own example with my addition
<TelerikPanelBar Data="@FlatData" @bind-ExpandedItems="@ExpandedItems">
<PanelBarBindings>
<PanelBarBinding>
@{ var _c = context as object
@if(_c.GetType() = Type)
{
<ContentTemplate>
<div class="panelbar-template">
<h2 class="k-text-primary">Custom Template:</h2>
@(((PanelBarItem)context).Text)
</div>
</ContentTemplate>
}
else
{
<ContentTemplate>
<div class="panelbar-template">
<h2 class="k-text-primary">Custom Template 2:</h2>
@(((PanelBarItem)context).Text)
</div>
</ContentTemplate>
}
}
<HeaderTemplate>
<strong>@(((PanelBarItem)context).Text.ToUpper())</strong>
</HeaderTemplate>
</PanelBarBinding>
</PanelBarBindings>
</TelerikPanelBar>
I have a problem when I tried to add a control on the TreeListCommandButton
the context is not resolved
Telerik version: 2.17.0
Hi Team,
Is that possible to add column name for draggable row in Telerik grid.
Please find the attached screen shot for your reference.
Thank you.
Lakshmipathi K
I have a Telerik Blazor Grid where I am doing a custom OnRead event to get the data.
I am trying to detect within that event handler when the grid filters have changed as I need to request extra data if someone changes the grid filters in anyway.
I have tried comparing the previous filters with the new request filters but it says they are always different even when just requesting a new page in the grid.
My code looks like this:
protected override async Task OnReadHandler(GridReadEventArgs e)
{
if (!ReHydrateGridFromPersistedState)
{
//no grid state exists so call the database for data
var filtersHaveChanged = GridRequest != null && !GridRequest.Filters.Equals(e.Request.Filters);
GridRequest = e.Request;
if (filtersHaveChanged)
{
ExtraData = await GetExtraDataAsync();
}
await base.OnReadHandler(e);
}
else
{
GridRequest = e.Request;
}
}
var filtersHaveChanged = GridRequest != null && !GridRequest.Filters.Equals(e.Request.Filters);
/* filtersHaveChanged is ALWAYS true */
I've implemented code that will save the state of the grid columns and reapply that state when the grid renders. If a column is rearranged to a new location it seems to cause a problem with the resizing logic. In my case, I've got a grid with many columns (37). I rearrange a single column. This results in the new column state being saved. (In this example, all I have done is move 1 column from its original position). I then refresh the page. On page initialization, the column state is read and applied to the grid. Next, I resize a single column. (In this example, the first column). The result is that every column between the original location of the moved column and its new location are resized.
What appears to be happening is that somehow the grid saved the columns widths for each column before the resizing and then after the first column was resized, the rest of the columns had their original column widths reapplied but its ignoring the fact the the column state had changed after loading so that the column widths are being applied to the wrong columns. (This feels like an awful explanation and is hard to follow I'm sure). I'm attaching a screenshot of the before/after html that illustrates how the column widths get messed up. Hopefully the visualization will help. The image shows the state of the column widths before and after the first column is resized.
Hi,
I wanted to disable the particular row in Telerik grid (or) disable the particular row buttons on grid.
Please help me out ASAP.
Thank you,
LakshmiPathi K
Hello, I have been using the TreeView and NumericTextBox components in 2.22 and 2.24 for months now without a problem. Today I added a ContextMenu to the project and carefully followed the instructions for client-side apps. After many hours of solid research, the new component produces nothing but: A Telerik component on the requested view requires a TelerikRootComponent to be added to the root of the MainLayout component of the app.
I have checked the documentation and all the obvious files related to this, and they all seem okay, except the sample MainLayout.cs file does not work as written (is it erroneous?). I have pasted mine below.
I'm using the single package Telerik.UI.for.Blazor 2.24.0. The project is very large, so I can only paste a few snippets below. I've completely run out of ideas on this problem. Maybe I'm missing a css or js file, or a package -- Thanks, Greg
<link rel="stylesheet" href="_content/Telerik.UI.for.Blazor/css/kendo-theme-default/all.css" />
<script src="_content/Telerik.UI.for.Blazor/js/telerik-blazor.js" defer></script>
builder.Services.AddTelerikBlazor();
@inherits LayoutComponentBase
<TelerikRootComponent>
@Body
</TelerikRootComponent>
@inherits TelerikLayout @Body