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.

Cannot tab in an essential grid control.

Thread ID:

Created:

Updated:

Platform:

Replies:

54472 Jan 9,2007 02:02 PM Mar 14,2018 03:01 AM Windows Forms 12
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On January 9, 2007 02:02 PM

Can some one help me with tabbing feature in grid control. I populate the grid programmatically and I have tried the following :
this.gridControl.Model.Options.WrapCellBehavior = GridWrapCellBehavior.WrapRow

But it does not work. Thanks in advance.

Administrator [Syncfusion]
Replied On January 9, 2007 03:30 PM

The property you listed should allow for tabbing between rows. Here is a little sample showing it working.

http://www.syncfusion.com/Support/user/uploads/WindowsApplication59_966f5f33.zip

Some things to check in your code include whether you have cell properties like style.Enabled = false; or grid.Enabled = false. If so, this will interfere with this tabbing behavior. Also, there are events that might affect this behavior like CurrentCellActivating, QueryNextCurrentcell, CurrentcellMoving, etc. If you can post a sample showing the problem, we can try to spot what is going wrong.

Administrator [Syncfusion]
Replied On January 9, 2007 04:15 PM

Thank you for the quick response. I have a combo boxes and a grid control on my form. The user selects from a combo box and the grid is populated with data to be edited. Some of the cells are read only. But that's all the property I set.

I initialize the grid with the following
// Set grid column headers
this.grdTarget[0, 1].Text = "Symbol";
this.grdTarget[0, 2].Text = "Spread Ratio";
this.grdTarget[0, 3].Text = "Order Ratio";


// set target grid row one, column 2 and 3 to default readonly values

this.grdTarget[1, 2].Text = "1";
this.grdTarget[1, 2].BackColor = Color.LightGray;
this.grdTarget[1, 2].ReadOnly = true;

this.grdTarget[1, 3].Text = "1";
this.grdTarget[1, 3].BackColor = Color.LightGray;
this.grdTarget[1, 3].ReadOnly = true;


this.grdTarget[2, 2].Text = "0";
this.grdTarget[2, 2].CellValueType = typeof(double);
this.grdTarget[2, 3].Text = "0";
this.grdTarget[2, 3].CellValueType = typeof(double);

this.grdTarget[3, 2].Text = "0";
this.grdTarget[3, 2].CellValueType = typeof(double);
this.grdTarget[3, 3].Text = "0";
this.grdTarget[3, 3].CellValueType = typeof(double);


//Allow tabbing in grid
this.grdTarget.Model.Options.WrapCellBehavior = GridWrapCellBehavior.WrapRow;

Not sure what I am missing. Is there a property at the grid level apart from TabStop that I need to set so it enables tabbing in the grid control? Thanks.

>Can some one help me with tabbing feature in grid control. I populate the grid programmatically and I have tried the following :
this.gridControl.Model.Options.WrapCellBehavior = GridWrapCellBehavior.WrapRow

But it does not work. Thanks in advance.

Administrator [Syncfusion]
Replied On January 10, 2007 05:51 AM

After selecting something in the combobox, are you setting the focus back to the grid? (ie, calling grid.Focus();). If not, the tab keys will not be going to the grid, but instead to the combobox.

Administrator [Syncfusion]
Replied On January 10, 2007 09:42 AM

The first time the form loads, user can tab directly to the grid to enter data. The form serves two purposes : Add/Edit. If they choose not to select anything from the combo box, they can enter data in the grid. In the scenario when the form loads and I try to tab to the grid, but I am unable to. I have tabstop property set to true and the tabindex set as well. Any help would be appreciated. Thanks.

>Can some one help me with tabbing feature in grid control. I populate the grid programmatically and I have tried the following :
this.gridControl.Model.Options.WrapCellBehavior = GridWrapCellBehavior.WrapRow

But it does not work. Thanks in advance.

Administrator [Syncfusion]
Replied On January 10, 2007 10:14 AM

So, your problem is tabbing TO the grid, not tabbing from cell to cell within the grid, correct?

And it only occurs when you first load the form, correct?

The WrapRow setting only affects the tabbing within the grid. It does not affect the tabbing to the grid.

Look real close at the top-left cell when you do the tabbing the first time. What might be happening is that this cell is getting focus when the grid gets focus from the first tabs. This is because no current cell has been set initially. So, in your form load, try setting

this.grid.ForceCurrentCellMoveTo = true;
this.grid.CurrentCell.MoveTo(1, 1);

This should make it so that when you tab into the grid the first time, you will see the focus in the grid go to cell 1,1 instead of 0,0.

If this does not explain what you are seeing, if you modify the above sample to show the problem you are having, we can debug it here.


Administrator [Syncfusion]
Replied On January 10, 2007 10:38 AM

Here's what I noticed. I cannot tab to the grid on the form, or once I manually go to a cell in the grid, I cannot move up or down using the arrows or tab from right to left. It's like this grid will not respond to any keyboard events. I can only click and enter data in the cells. I created a new test project and just dropped the grid and I can tab through it. I am not sure what property I may have changed for this behavior to occur in my project. Any ideas? I tried all the above and no luck..


Administrator [Syncfusion]
Replied On January 10, 2007 11:24 AM

Check the output window to see if you see any exceptions being thrown. If so, that might affect this behavior.

Are you handling any events like CurrentCellValidating that might be affecting whether or not you can leave the cell.

Do a search in your code for any property settings that might affect what keys the grid might accept? ( grid.WantKeys or grid.WantTabKey or ???)

What grid events are you handling? You could try commenting them out one at the time to see if any of your handlers are affecting this behavior.

Administrator [Syncfusion]
Replied On January 11, 2007 05:09 PM

Hi, thanks for the response. I had some time to look into this problem today and found out something interesting. If I set the rowHeader Property to False, I see that I can't tab in the grid control. Has anyone come across this or am I missing something? Any help will be appreciated.

Administrator [Syncfusion]
Replied On January 12, 2007 09:50 AM

Please can someone let me know how to solve the situation I mentioned earlier. Thanks.

>Can some one help me with tabbing feature in grid control. I populate the grid programmatically and I have tried the following :
this.gridControl.Model.Options.WrapCellBehavior = GridWrapCellBehavior.WrapRow

But it does not work. Thanks in advance.

Administrator [Syncfusion]
Replied On January 13, 2007 03:37 PM

To hide your row headers, use grid.Cols.Hidden[0] = true; to see if that allows the tabbing to work. Also, make sure your have a currentcell set.

If you can post a sample showing the problem, we can try to resolve it. I posted a sample in your other thread that shows the tabbing working in the situation you described.

chris
Replied On March 13, 2018 05:11 PM

To hide your row headers, use grid.Cols.Hidden[0] = true; to see if that allows the tabbing to work. Also, make sure your have a currentcell set.

If you can post a sample showing the problem, we can try to resolve it. I posted a sample in your other thread that shows the tabbing working in the situation you described.

good report

Sindhu Nagarajan [Syncfusion]
Replied On March 14, 2018 03:01 AM

Hi Chris, 
  
Thanks for the update. 
Please let us know if need any assistance. 
  
Regards, 
Sindhu 


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.

;