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
close icon

Unusual behavior with shared scrollbars

First of all, this is a 3.01 version of the grid. We are version locked at this point, so if this has been fixed, I''d appreciate a pointer to where I might be able to fix it in the source.

I''ve attached a sample app. I''m not sure how much of this needs to be there, but this is the situation I can reproduce it in. The code is, of course, in Form1.cs.

The grid is virtual. I''ve set up the shared scrollbars to always show in this case. It has 2 columns of data. You''ll notice 2 lines commented out. If you uncomment these lines (and thus there are no row headers), everything works as it should.

If those two lines remain commented out, you end up with a grid with row headers and 2 columns.

The first thing you''ll notice is that both the shared and regular scrollbars are showing. This is not a problem in the case of my real grid since I actually place our shared scrollbar over that scrollbar, but nonetheless, it''s curious.

The problem that''s getting me is the shared scrollbar (and for that matter, both scrollbars) don''t work when you resize the row header column. If you resize the row header column to be large such that the two columns go out of view, you can''t scroll to get them in view. If you resize either of the right two columns such that they go out of view, scrolling works fine.

What''s going on here and how do I get the behavior that I want such that resizing either the header or the data columns gives me the ability to scroll to view everything.

Thanks.



TwoColGridSamp.zip

1 Reply

AD Administrator Syncfusion Team August 16, 2006 07:38 AM UTC

Hi Pete,

Issue 1: Appearing the Grid Scrollbar.

To disappear the grid scrollbar in Shared ScrollBarMode, you can set the H/VScrollBehavior to GridScrollbarMode.Shared only.

grid.HScrollBehavior = GridScrollbarMode.Shared;
grid.VScrollBehavior = GridScrollbarMode.Shared;

Issue 2: Rowheader issue.

This is by design. By default the RowHeader is fixed column (It is Non-scrolling Column). To scroll the RowHeader, you need to hide the Default RowHeader and add the Extra RowHeader in a Grid. Here is a code snippet.

//hide the Default header.
grid.Properties.RowHeaders = false;

//Add Extra RowHeader Column
grid.Cols.HeaderCount = 1;

//Increase the Column count in QueryColcount.
e.Count= 3;

Let me know if this helps.
Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon