Telerik Forums
UI for Blazor Forum
1 answer
16 views

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

Dimo
Telerik team
 answered on 07 Jul 2021
1 answer
13 views

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 */

Marin Bratanov
Telerik team
 answered on 06 Jul 2021
1 answer
11 views
I use data annotations heavily in my view models. I understand that if I let the Telerik form tag I can get the labels to generate and display from my data annotations but I am not auto generating my forms.   How do I make use of the Data Annotations with hand crafted forms?
Marin Bratanov
Telerik team
 answered on 06 Jul 2021
0 answers
18 views

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.

Jeffrey
Top achievements
Rank 2
Iron
Veteran
Iron
 updated question on 06 Jul 2021
1 answer
14 views

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

Matthias
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 06 Jul 2021
1 answer
12 views
I'm trying to pass a string containing a '<strong>#</strong>' character to an OData api and DataSourceRequest.ToODataString() is not encoding the character.&nbsp; Is it suppose to?
Svetoslav Dimitrov
Telerik team
 answered on 06 Jul 2021
2 answers
36 views

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

index.html

<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>

Program.cs

builder.Services.AddTelerikBlazor();

TelerikLayout.razor

@inherits LayoutComponentBase

<TelerikRootComponent>
  @Body
</TelerikRootComponent>

MainLayout.razor

@inherits TelerikLayout

@Body

Greg
Top achievements
Rank 1
Iron
 answered on 05 Jul 2021
1 answer
8 views

Hi, I have a Blazor WASM project that uses TelerikTextArea components in its pages, and I noticed it took a massive performance hit when we added a <DataAnnotationsValidator /> to the EditForms on these pages. To verify if this was just our project or not, I created a new Wasm Blazor app and added:

  • A new Razor Component with an EditForm
  • a class with 4 strings, 2 with [Required} annotations, set to be the model of the editform
  • 4 TelerikTextAreas in the form for each of the strings in the model
  • a <DataAnnotationsValidator />

Without the <DataAnnotationsValidator /> I did not see any performance issues filling out these textboxes, but with it added to the form there is an obvious stutter when typing in these textareas. If I increase the number of text areas the stutter gets worse, freezing up the page for 10-15 seconds at the worst. I cloned this Component and changed all of the TelerikTextAreas to InputTextAreas and the performance issues are gone.

I recorded the performance of the page with the Chrome dev tools and noticed that Event: keypress Handler takes far longer to resolve than if the <DataAnnotationsValidator /> is removed or InputTextAreas are used. 

The stutter is mildly inconvenient on this test page I created, but in a larger existing component adding validation to the forms has rendered these Telerik components just about useless. Has anyone else encountered these serious performance issues?

Nadezhda Tacheva
Telerik team
 answered on 05 Jul 2021
0 answers
9 views

 

Hello Team
In Treelist the popup does not close after the update

is something wrong with this code ?

<TelerikTreeList Data=@vm.Model
                     IdField="Id"
                     ParentIdField="ParentId"
                     Sortable=true Pageable=true
                     EditMode="@TreeListEditMode.Popup"
                     SelectionMode="@TreeListSelectionMode.Single"
                     OnCreate="@CreateItem"
                     OnUpdate="@UpdateItem"
                     OnDelete="@DeleteItem">
        <TreeListToolBar>
            <TreeListCommandButton Command="Add" Icon="add">Add</TreeListCommandButton>
        </TreeListToolBar>
        <TreeListColumns>
            <TreeListColumn Field=@nameof(ModelHierarchyInfo.Name) Expandable="true" Width="250px"></TreeListColumn>
            <TreeListColumn Field=@nameof(ModelHierarchyInfo.Designation)></TreeListColumn>
            <TreeListCommandColumn Width="220px">             
                <TreeListCommandButton Command="Add" Icon="add"></TreeListCommandButton>
                <TreeListCommandButton Command="Edit" Icon="edit"></TreeListCommandButton>
                <TreeListCommandButton Command="Delete" Icon="delete"></TreeListCommandButton>
                <TreeListCommandButton Command="Save" Icon="save" ShowInEdit="true"></TreeListCommandButton>
                <TreeListCommandButton Command="Cancel" Icon="cancel" ShowInEdit="true"></TreeListCommandButton>
            </TreeListCommandColumn>
        </TreeListColumns>
    </TelerikTreeList>

ITGWANA
Top achievements
Rank 1
 updated question on 05 Jul 2021
1 answer
4 views

Hi, I am using the telerik blazor component for the first time as a Korean developer.

When entering the first consonant in Korean, two consonants are created at the same time.

Two identical consonants are also entered when typing the enter key and typing letters on a new line.

There is no problem when typing English.

If you refer to the attached picture, you will understand quickly.

Is there a way for the editor to support Korean input?

Svetoslav Dimitrov
Telerik team
 answered on 05 Jul 2021
Top users last month
Psyduck
Top achievements
Rank 4
Bronze
Iron
Iron
Om Pushkara deep
Top achievements
Rank 2
Iron
Iron
Iron
Valery
Top achievements
Rank 1
Iron
Peter
Top achievements
Rank 1
Veteran
Iron
George C.
Top achievements
Rank 2
Iron
Veteran