I''m using 188.8.131.52 Suite and I have the following problem:
I have the grid control on a form that has AutoScroll enabled. In the upper area of the form I have some dropdowns which specify the grid''s content.
Now, when a cell is active and I resize the form the active cell is always scrolled into view automatically. Can I prevent this behaviour and keep the upper area visible unless I use the scrollbars of the form to scroll to the grid cell manually?
Thanks in advance,
ADAdministrator Syncfusion Team June 30, 2005 04:15 AM
This is likely a WIndows Forms behavior. You can test this by creating a project with a scrollable form and adding a TextBox to the bottom of the form. Then run the project and size the form. You will see the scrollbar adjust so that the active textbox is always visible.
I do not know of a nice clean way to avoid this behavior. You can hack by doing something like put a 1x1 button at the top of your form. Then handle form.Resize and call buttun1.Focus() in the handler. This is move teh focus away from teh active control and noot require the window to scroll.
CRChristian RattatJune 30, 2005 05:22 AM
I should have noticed myself that this comes from the form and not from the grid.
CRChristian RattatJune 30, 2005 06:29 AM
it seems there is another reason for the problem. I tried your solution in a sample and it works. But in my actual application I have an mdi form which uses the SyncFusion tabbed mdi manager. The form that holds the grid is an mdi child. Now, when I set the focus to the test button the focus remains on the grid. Even if I do a currentcell.deactivate and then set the focus to the button or the form (or anything else) it remains on the grid.
I have attached a sample that shows the behaviour.
ADAdministrator Syncfusion Team June 30, 2005 07:15 AM
In your SizedChanged handler, try setting the form''s ActiveControl to be the button.