Shift + selection not working as desired in grid

1 Answer 33 Views
Grid
Shashi
Top achievements
Rank 1
Shashi asked on 26 May 2022, 08:12 AM | edited on 30 May 2022, 04:45 AM

Hello,

When locked columns and multi-column headers are configured in a grid and selectable: "multiple cell" is configured, we observed

  • Ctrl+ selection is working fine
  • Mouse drag and selection also working fine
  • Shift + selection is not working as expected (seems buggy behavior) 

Example : https://dojo.telerik.com/@shashi.kumar/IdeKUHam

What is the behavior of shift + selection on grid? Is there any documentation for the same?

Is there any way we can disable shift + selection for the grid? (ctrl selection & mouse selection should work)

 

Thanks

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 31 May 2022, 06:42 AM

Hi Shashi,

I confirm this is a bug with the Shift selection when multi headers are configured. Please refer to the following links for tracking of it:

As t token of gratitude, I have added some Telerik points to your account.

Finally, there is no straightforward approach for achieving the disabling of just the shift key. However, you can try the following approach to see if it is working correctly for the project requirements:

var grid = $("#grid").getKendoGrid();
  
grid.tbody.on('mousedown',function(e){
    grid.selectable._allowSelection = function() { return true };
    
    if(e.shiftKey){     
        grid.selectable._allowSelection = function() { return false };      
    }        
});

Let me know if you have any questions.

Regards,
Nikolay
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.

Tags
Grid
Asked by
Shashi
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or