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 am using GridDataControl as a popup (showing the matches for the criteria entered in a Textbox). I want to handle UP, DOWN, PAGEUP, AGEDOWN, HOME and END keys in the grid. Since these key input events are part of Textbox, I have a public method that handles this:
public bool HandleKey( Key key, ModifierKeys modifiers ) { switch (key) { case Key.Up: { ICollectionViewAdv collectionViewAdv = resultsGrid.Model.View; if (collectionViewAdv.CurrentPosition > 0) collectionViewAdv.MoveCurrentToPrevious(); break; } case Key.Down: { ICollectionViewAdv collectionViewAdv = resultsGrid.Model.View; if (collectionViewAdv.CurrentPosition < collectionViewAdv.Records.Count - 1) { collectionViewAdv.MoveCurrentToNext(); } break; } case Key.Home: { resultsGrid.Model.View.MoveCurrentToFirst(); break; } case Key.End: { resultsGrid.Model.View.MoveCurrentToLast(); break; } case Key.Enter: onSelectRow(); break; default: return false; } return true; }
I don't know how to handle PAGEUP and PAGEDOWN. Is this the right way of doing? Can you tell me how to handle PAGEUP and PAGEDOWN? Please let me know if you have any quetions. Thanks.