2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
SfDataGrid doesn’t have direct support to disable this sound, which occurs when pressing Tab key on the TextBox. It is the behavior of the default TextBox. However, you can disable this by enabling the SuppressKeyPress property within the KeyDown event of the TextBox. In SfDataGrid cells this can be achieved by creating custom renderer. this.sfDataGrid.CellRenderers["TextBox"] = new GridTextBoxCellRendererExt(); class GridTextBoxCellRendererExt : GridTextBoxCellRenderer { protected override void OnInitializeEditElement(DataColumnBase column, Syncfusion.WinForms.GridCommon.ScrollAxis.RowColumnIndex rowColumnIndex, TextBox uiElement) { base.OnInitializeEditElement(column, rowColumnIndex, uiElement); uiElement.KeyDown += uiElement_KeyDown; } protected override void OnUnwireEditUIElement(TextBox uiElement) { base.OnUnwireEditUIElement(uiElement); uiElement.KeyDown -= uiElement_KeyDown; } void uiElement_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Tab) e.SuppressKeyPress = true; } }
|
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.