Welcome to the WinForms feedback portal. We’re happy you’re here! If you have feedback on how to improve the WinForms, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
I'm creating new Windows Forms App (.NET Framework). I'm adding new controls on Form1: Syncfusion.WinForms.DataGrid.SfDataGrid and System.Windows.Forms.Button.
Form1 code looks like this:
public partial class Form1 : Form
{public Form1()
{InitializeComponent();
DataTable dt = new DataTable();
dt.Columns.Add("ID", typeof(int)); dt.Columns.Add("Value", typeof(string));dt.Rows.Add(1, "aaa");
dt.Rows.Add(2, "bbb");
dt.Rows.Add(3, "ccc");
sfDataGrid1.DataSource = dt;
sfDataGrid1.AllowStandardTab = true;
sfDataGrid1.SelectedIndex = 0;
}
}
When I run this application and I press TAB key, button1 receives focus. Now when I press any arrow key (up/down/left/right), sfDataGrid1 receives focus, but I can't use arrow keys to navigate through datagrid (this seems to be a bug). The only way to correctly set focus (so user can control datagrid with arrow keys) is to use this code
sfDataGrid1.TableControl.Focus();SfDataGrid focus should be set correctly without this code.