We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to disable the keyboard shortcuts for Pivotgrid?

How to disable the keyboard shortcuts for Pivot-Grid?

3 Replies

SN Sivamathi Natarajan Syncfusion Team February 11, 2020 06:48 AM

 
Currently, the pivot table doesn’t have option to disable the keyboard navigation. And, we don’t have any immediate plans to implement it.  
 
Regards, 
Sivamathi. 



SH Shreekumar February 12, 2020 12:44 AM

As implemented in this example, I'm appending a TextBox inside a cell for edit purpose. But, due to PivotGrid keyboard shortcuts, I'm unable to use Left Arrow Key and Right Arrow Keys within a TextBox.


SN Sivamathi Natarajan Syncfusion Team February 12, 2020 10:24 PM

 
You can restrict the keyboard shortcuts using following code example. 
 
Code Example: 
 
<div class="row"> 
  <ejs-pivotview #pivotview id='PivotView' [dataSourceSettings]=dataSourceSettings showTooltip='false' width='100%' 
    height='300' [gridSettings]='gridSettings' [editSettings]='editSettings' (drillThrough)='drillThrough($event)' (dataBound)='dataBound($event)'> 
  </ejs-pivotview> 
</div> 
 
 
dataBound(args): void { 
    this.pivotObj.grid.addEventListener('keyPressed', this.keyDownHandler.bind(this)); 
  } 
 
  keyDownHandler(args: KeyboardEventArgs) { 
    args.cancel = true; 
  } 
 
 
 
Meanwhile, we have prepared a sample for your reference. Kindly check the below sample link. 
 
 
We hope the above sample meets your requirements. 
 
Regards, 
Sivamathi. 


Loader.
Live Chat Icon For mobile
Up arrow icon