How to turn off selection only inside editable cell - selectableSettings Kendo Grid

1 Answer 198 Views
Grid Styling TextBox
Dawid
Top achievements
Rank 1
Dawid asked on 13 Oct 2021, 01:22 PM

Hello,

how to turn off selection only inside cell which is editable and in edit mode? When you select some data inside editable cell you can see this selection (color red - added screenshot).

I still want to  be able to select cells outisde editable cell, but I want to turn this off while my mouse cursor is inside cell which is in edit mode.

I would like to have normal selection while cell is in edit mode and while I'm starting selection from inside cell.

 

Stackblitz with issue: https://stackblitz.com/edit/angular-wsp7zm-27tmxu?file=app/app.component.ts

 

Regards,

Dawid

 

 

1 Answer, 1 is accepted

Sort by
1
Accepted
Dimiter Topalov
Telerik team
answered on 15 Oct 2021, 07:52 AM

Hello Dawid,

There are two possible ways to customize the default behavior when a Grid cell is in editing mode, and the drag selection is enabled:

1) Stop the drag selection when a cell is opened for editing, and bring it back on when the cell is closed, for example:

https://stackblitz.com/edit/angular-wsp7zm-yip4cc?file=app/app.component.ts

2) Stop the propagation of the pointer-down event from the editor used within the Grid cell (the Grid Edit template will be needed to provide a custom editing UI with the respective DOM event handler), e.g.:

<input (pointerdown)="$event.stopImmediatePropagation();"  ...
Here is the modified example:

https://stackblitz.com/edit/angular-wsp7zm-idyrhp?file=app%2Fapp.component.ts

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Dawid
Top achievements
Rank 1
commented on 26 Oct 2021, 07:29 AM

Hello Dimiter,

thank you for provided example and explanation, it works.

 

Regards,

Dawid

Tags
Grid Styling TextBox
Asked by
Dawid
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or