I''m having a little problem when I control horizontal scrolling the Essential Grid manually:
myGridControl.HScrollBehavior = Syncfusion.Windows.Forms.Grid.GridScrollbarMode.Disabled;
I have added buttons for scrolling up and down on a panel below the grid inside a panel control. This panel is visible only if there''s a need to display the buttons, and it''s visibility is controlled dynamically.
Scrolling up and down is done by incrementing and decrementing the TopRowIndex property of the grid.
The problem occurs when for instance the grid has more rows than the display area can display at once. Then my scrollbutton container panel is set visible (to enable scroll up) but it seems as if the grid control isn''t resized, because I can''t scroll down to display last rows. My panel is about two rows heigh, and excatly these two rows will never be visible. When I try to change TopRowIndex to see these last rows, it is ignored.
Can you please give me a clue on what''s wrong?
ADAdministrator Syncfusion Team April 1, 2005 05:29 AM
My guess is that this is a docking problem.
Is the grid and the scroll panel docked in some way on the parent panel?
If so, make sure you first put the scroll panel onto the parent panel and dock it Bottom. Then drop the grid on the parent panel, and dock it Fill. Be sure to remove the grid entirely from the form before you re-add it to the parent panel after adding teh scroll panel. The panel docking is applied in the order the controls are added to the panel. So, the general rule is that the control that is set dock=Fill must be the very last one added. Otherwise, it will think it has client area under some of the controls that were added later.
BHBenny HestApril 4, 2005 06:10 AM
I checked the InitializeComponents method of my user control. The grid control is added after the scrollbutton panel :(
Any other suggestions?
ADAdministrator Syncfusion Team April 4, 2005 06:25 AM
Tab orders may be playing a role.
I would try completely removing the grid from the project leaving all other controls as you currently have them. Then drop a new grid back onto the panel and set it to dock.Fill. Unless you do this, I suspect some old tab setting or something serialized out in binary resources may still be affecting the Dock architecture.
If you can upload a sample, we can try debugging it here.
BHBenny HestApril 4, 2005 07:25 AM
Tried that too. I''ve made a little zip package for you to test. I''d be thrilled if you can help me.
ADAdministrator Syncfusion Team April 4, 2005 01:28 PM
Here is a try at getting this working. I adjusted the height of the OnLayout and did not try to rely on the docking to position it properly.
BHBenny HestApril 4, 2005 02:45 PM
Your solution solved my problem.
Thanks a lot for your help!