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

Tab behavior

How can I achieve the following tab behavior: 1) Pressing tab inside the grid activates next enabled cell even if is on the next row 2) pressing tab on the right-most bottom cell moves focus outside the grid Gene Gorokhovsky GDBG 1.6.1.6

5 Replies

AD Administrator Syncfusion Team October 31, 2003 12:50 PM UTC

See model.Options.WrapCellBehavior. You should set it to GridWrapCellBehavior.NextControlInForm Stefan


GG Gene Gorokhovsky November 3, 2003 11:27 AM UTC

> See model.Options.WrapCellBehavior. > > You should set it to GridWrapCellBehavior.NextControlInForm Unfortunately this setting seems to be broken in my version (1.6.1.6). After debugging grid source, it looks like grid sometimes cannot find the next/previous tab-enabled control. In our application grid is embedded in a panel, which is embedded in another panel which is embedded in the form. Previous and next tab-enabled controls are also enabled in (different) panels. We traced the offending code to method bool Move(GridDirectionType direction, int num, bool extendSelection, bool wrapCell) in GridControlBase. Their there are two calls to f.SelectNextControl. The third parameter in the code is set to false, meaning that the .Net will not lookup tab-enabled nested controls on the form. It should be set to true, then the grid transfers the focus correctly. Gene Gorokhovsky


GG Gene Gorokhovsky November 3, 2003 11:30 AM UTC

We, of course, meant that the 4-th parameter to f.SelectNextControl is incorrect, not the third. Gene > > See model.Options.WrapCellBehavior. > > > > You should set it to GridWrapCellBehavior.NextControlInForm > > Unfortunately this setting seems to be broken in my version (1.6.1.6). After debugging grid source, it looks like grid sometimes cannot find the next/previous tab-enabled control. In our application grid is embedded in a panel, which is embedded in another panel which is embedded in the form. Previous and next tab-enabled controls are also enabled in (different) panels. We traced the offending code to method > bool Move(GridDirectionType direction, int num, bool extendSelection, bool wrapCell) in GridControlBase. Their there are two calls to f.SelectNextControl. The third parameter in the code is set to false, meaning that the .Net will not lookup tab-enabled nested controls on the form. It should be set to true, then the grid transfers the focus correctly. > > Gene Gorokhovsky


AD Administrator Syncfusion Team November 3, 2003 12:07 PM UTC

The Options.WrapCellBehavior works properly for grids directly on a form. But for grids parented to other containers like groupboxes, panels, usercontrols, ????, you have to do a little extra work. Take a look at this thread. http://www.syncfusion.com/forums/message.asp?MessageID=7010 Item #3 there discusses this problem and has a sample that works for panels.


GG Gene Gorokhovsky November 3, 2003 05:42 PM UTC

This "bug by design" should either be fixed or highlighted in documentation for WrapCellBehavior. > The Options.WrapCellBehavior works properly for grids directly on a form. But for grids parented to other containers like groupboxes, panels, usercontrols, ????, you have to do a little extra work. Take a look at this thread. > > http://www.syncfusion.com/forums/message.asp?MessageID=7010 > > Item #3 there discusses this problem and has a sample that works for panels. >

Loader.
Live Chat Icon For mobile
Up arrow icon