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.
Unfortunately, activation email could not send to your email. Please try again.

Weird Tab Behavior

Thread ID:

Created:

Updated:

Platform:

Replies:

29468 May 25,2005 04:59 PM May 25,2005 09:01 PM Windows Forms 2
loading
Tags: GridControl
Tim Aquino
Asked On May 25, 2005 04:59 PM

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,

Tim Aquino
Replied On May 25, 2005 05: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, >

Administrator [Syncfusion]
Replied On May 25, 2005 09: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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;