Unplanned
Last Updated: 16 Feb 2021 12:45 by René
René
Created on: 12 Feb 2021 10:26
Category: UI for Blazor
Type: Bug Report
1
Make TextArea accept newlines if used in EditorTemplate of GridColumn

If the TextArea component is used within an EditorTemplate of a grid column, edit mode is always closed upon hitting ENTER.  The thing is that I'm using the TextArea to allow the user to input several lines.  Upon Enter the user wants to move to a new line within the TextArea and not to finish the edit mode.

Regards,

René

---

ADMIN EDIT

For the time being I can offer using the popup editing or a custom external edit form (inline or popup).

Another workaround would be to stop the keydown event propagation so the grid/treelist cannot consume it and close the cell:

        <TreeListColumn Field="EmailAddress" Width="220px">
            <EditorTemplate>
                @{
                    CurrentlyEditedEmployee = context as Employee;
                    <div @onkeydown:stopPropagation="true">
                        <TelerikTextArea @bind-Value="@CurrentlyEditedEmployee.EmailAddress"></TelerikTextArea>
                    </div>
                }
            </EditorTemplate>
        </TreeListColumn>

 

---

3 comments
René
Posted on: 16 Feb 2021 12:45

Hello Marin,

thanks a lot for the workaround preventing the event propagation - this will help a lot !

Regards,

René

ADMIN
Marin Bratanov
Posted on: 16 Feb 2021 10:02

Hello again René,

I have updated the opener post with another workaround - preventing the event propagation:

        <TreeListColumn Field="EmailAddress" Width="220px">
            <EditorTemplate>
                @{
                    CurrentlyEditedEmployee = context as Employee;
                    <div @onkeydown:stopPropagation="true">
                        <TelerikTextArea @bind-Value="@CurrentlyEditedEmployee.EmailAddress"></TelerikTextArea>
                    </div>
                }
            </EditorTemplate>
        </TreeListColumn>

 

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

ADMIN
Marin Bratanov
Posted on: 12 Feb 2021 20:52

Hello René,

Just four days ago we were discussing the same idea. You can click the Follow button to get notified when it becomes available.

For the time being I can offer using the popup editing or a custom external edit form (inline or popup).

 

Regards,
Marin Bratanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.