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.

Tab Order Thru Grids

Thread ID:

Created:

Updated:

Platform:

Replies:

57442 Mar 4,2007 10:02 PM Mar 6,2007 05:21 PM Windows Forms 3
loading
Tags: GridControl
Tom Affholter
Asked On March 4, 2007 10:02 PM

Is there a bug in the grid control when tabbing out of a griddatabaoundgrid after setting:

GridPhone.Model.Options.WrapCellBehavior = GridWrapCellBehavior.NextControlInForm ??

What I am finding is that if the next tab order after attempting to tab out of a grid is a textbox (in this case) in a container object (in this case a groupbox), the next control focus is set to is the next object not in any container. In other words, it appears the next tab order is a control not in a container.

If there is no solution, can I harness a tab event from a grid's rightmost column to force fucus to a specific textbox or like control?

I am coding this in VB.

Thanks,

Tom

Administrator [Syncfusion]
Replied On March 5, 2007 05:34 PM

Hi Tom,

One way you can do this by override the ProcessCmdKey method of the form and set the focus to GroupBox container control. Here is a code snippet.

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (this.gridControl1.ContainsFocus && keyData == Keys.Tab)
{
this.GroupBox.Focus();
return true;
}
return base.ProcessCmdKey (ref msg, keyData);
}

Best regards,
Haneef

Tom Affholter
Replied On March 6, 2007 12:30 PM

I am not coding C#. Is this done in the grid's keypress event? Could you translate.

Thanks much!

Administrator [Syncfusion]
Replied On March 6, 2007 05:21 PM

Hi Tom,

You can manage this issue by handling the CurrentCellKeyDown event of the grid and set the focus to another control. Here is a code snippet

Private Sub GridControl1_CurrentCellKeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) Handles GridControl1.CurrentCellKeyDown
If e.KeyData = Keys.Tab Then
Me.GroupBox1.Focus()
e.Handled = True
End If
End Sub

Best regards,
Haneef

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.

;