Onclick on Grid column

Our pure JavaScript Scheduler component


Post Reply
User avatar
jedgeley
Posts: 16
Joined: Thu Jun 18, 2020 2:22 pm

Onclick on Grid column

Post by jedgeley »

I have a grid . There i have column if i double click the particular column i needs to call my custom function that will do some operations. just like if we click button certain operations is happening right. Likewise i needs to do! Can you please suggest me on this!


User avatar
jedgeley
Posts: 16
Joined: Thu Jun 18, 2020 2:22 pm

Re: Onclick on Grid column

Post by jedgeley »

I found the solution: May be it will help for some beginners.

While double-clicking the column there u need to perform any custom methods/functions you can refer the below code :

Solution :" cellDblClick" add this against your column

Code: Select all

  listeners: {
                                        cellDblClick: ({ column }) => {
                                            if (column.field === 'column name') {
                                                alert('test');// your logic
                                            }
                                        }
                                    },

User avatar
sergey.maltsev
Core Developer
Core Developer
Posts: 567
Joined: Mon Dec 24, 2018 9:15 am

Re: Onclick on Grid column

Post by sergey.maltsev »

Hi!
Yes, you are right.
If you need cell actions you may use cellDblClick Event listerner.
https://www.bryntum.com/docs/scheduler/#Grid/view/mixin/GridElementEvents#event-cellDblClick


Post Reply