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

Weird Tab Behavior

Hi, The grid seems to show weird ''tab'' behavior if the grid is NOT enabled with only a few cells enabled. The tab (or arrow keys) won''t go to the other editable cells no matter what value I use in the grid.Model.Options.WrapCellBehavior property. I''ve attached a sample app for you to check. Thanks,

2 Replies

TA Tim Aquino May 25, 2005 04:03 PM

Hi, I am getting ''Permission Denied'' on my attachment so I jut cut/paste the code that disables the whole grid and enables some cells. ''Tab'' does not work from cell[2,1] to cell[4,4]. Only tab from cells in the same row or col work (ex, from cell[4,4] to cell[4,5]). Thanks, private void Form1_Load(object sender, System.EventArgs e) { int r, c; GridStyleInfo cell; GridControl grid = gridControl1; // show/hide row/col headers grid.Rows.Hidden[0] = true; grid.Cols.Hidden[0] = true; grid.TabStop = true; grid.WantTabKey = true; grid.Model.Options.WrapCellBehavior = GridWrapCellBehavior.WrapRow; // grid.Model.Options.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAll; // Optional: grid.Model.Options.ShowCurrentCellBorderBehavior = GridShowCurrentCellBorder.GrayWhenLostFocus; // disable grid cell = grid.TableStyle; cell.Enabled = false; //enable some cells cell = grid[2,1]; cell.Format = "P2"; cell.BackColor = Color.LightGoldenrodYellow; cell.Text = "enabled1"; cell.Enabled = true; cell = grid[4,4]; cell.BackColor = Color.LightGoldenrodYellow; cell.Text = "enabled2"; cell.Enabled = true; cell = grid[5,4]; cell.BackColor = Color.LightGoldenrodYellow; cell.Text = "enabled3"; cell.Enabled = true; cell = grid[6,2]; cell.BackColor = Color.LightGoldenrodYellow; cell.Text = "enabled4"; cell.Enabled = true; cell = grid[7,2]; cell.BackColor = Color.LightGoldenrodYellow; cell.Text = "enabled5"; cell.Enabled = true; cell = grid[8,3]; cell.BackColor = Color.LightGoldenrodYellow; cell.Text = "enabled6"; cell.Enabled = true; } >Hi, > >The grid seems to show weird ''tab'' behavior if the grid is NOT enabled with only a few cells enabled. The tab (or arrow keys) won''t go to the other editable cells no matter what value I use in the grid.Model.Options.WrapCellBehavior property. > >I''ve attached a sample app for you to check. > >Thanks, >


AD Administrator Syncfusion Team May 25, 2005 08:01 PM

If you a complex of enabled/disabled cells, then you will have to handle the MoveCurrentCellDirection event and manage moving the currentcell. The default support is really intended only for simple situations where there is maybe a column disabled in some part of the grid. The reason for this is that handling all possible situations would be an oberall performance hit on the grid. So, if you have some special situations, the idea is for you to handle this event and use special knowledge of your situation to efficiently move to teh next cell. Here is a sample illustrating this with your form. http://www.syncfusion.com/Support/user/uploads/GC_CheckBox_8e010e93.zip

Loader.
Live Chat Icon For mobile
Up arrow icon