Telerik Forums
UI for Blazor Forum
1 answer
2.8K+ 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
1.8K+ 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
826 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 5
Bronze
Bronze
Iron
 answered on 06 Jul 2021
1 answer
161 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
2.8K+ 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

gfkeogh
Top achievements
Rank 1
Iron
 answered on 05 Jul 2021
1 answer
401 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
198 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
168 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
1 answer
388 views
Is it possible to export grid data using a button outside of the grid using the api?  I haven't any examples.
Marin Bratanov
Telerik team
 answered on 03 Jul 2021
1 answer
452 views

Hi, I have some questions related to the new filter type in Grid - checkboxes

1. Is it possible to format decimal values in filter window? Attributes related to currency format like Display... do not work here. I have still values like 123.0000000000 in checkboxes filter window

2. Is it possible to format date values in filter window? I have dates in filter window with different format than in Grid.

3. Is it possible to sort values in filter window? I mean default behaviour/sorting (without writing templates for every column).

 

Thanks!

 

Marin Bratanov
Telerik team
 answered on 03 Jul 2021
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?