The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I''m building my own cell renderer which hosts a specific type of control. I''ve noticed that if I press enter or the arrow keys while my control has focus, the grid will intercept the key press and do what it would normally do with it and my control never sees those keys. Normal keys work as expected, it''s just special keys like enter, arrows, escape, etc.
What do I have to do in my cell renderer to pass these key events onto my control and not have the grid see and use them.
ADAdministrator Syncfusion Team August 9, 2006 10:42 AM UTC
Hi Amit,
Since Grid hosts your control inside the cell, it will use the keys navigation keys to move between the cells and will not pass on to the custom Control. So if the Control (CurrentCell) is in focus, then we need to programmatically do the required functions.
You can try setting the Grid.WantKeys flag to true in the ProcessKeyEventArgs override and revert it back to false in the Keyup event of the custom control, so that the key messages will not be processed by grid. If you set WantKeys property of the grid to false, the grid will not process any keys like, TAB, arrow keys, Esc, etc.
protected override void OnInitialize(int rowIndex, int colIndex) { // this.Control.KeyUp += new KeyEventHandler(Control_KeyUp); }