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.

shared scroll bars

Thread ID:

Created:

Updated:

Platform:

Replies:

36722 Nov 8,2005 06:48 PM Dec 17,2005 05:10 AM Windows Forms 6
loading
Tags: GridControl
Jason Talaban
Asked On November 8, 2005 06:48 PM

Hi there, I''m working on a form that has 2 virtual grids setup. The data are related and lined up in columns. I want them both to scroll together. How do I link up an independent scrollbar to my 2 GridControls and then make their original scrollbars invisible? Or is there another way of doing this? Thanks for any pointers.

Administrator [Syncfusion]
Replied On November 9, 2005 03:34 AM

Hi , Please try this code and let me know if you need any other further assistance. //shares gridcontrol1scrollbars gridControl1.HScrollBehavior = GridScrollbarMode.Shared; gridControl1.VScrollBehavior = GridScrollbarMode.Shared; gridControl1.UseSharedScrollBars = true; gridControl1.VScrollBar.InnerScrollBar = vScrollBar1; gridControl1.HScrollBar.InnerScrollBar = hScrollBar1; //shares gridcontrol2scrollbars gridControl2.HScrollBehavior = GridScrollbarMode.Shared; gridControl2.VScrollBehavior = GridScrollbarMode.Shared; gridControl2.UseSharedScrollBars = true; gridControl2.VScrollBar.InnerScrollBar = vScrollBar1; gridControl2.HScrollBar.InnerScrollBar = hScrollBar1; Here is a sample for implementing it. 36722forum.zip Regards, Haneef

Administrator [Syncfusion]
Replied On November 9, 2005 12:22 PM

Did exactly what I needed it to, thanks so much for your help! >Hi , > Please try this code and let me know if you need any other further assistance. > > //shares gridcontrol1scrollbars > gridControl1.HScrollBehavior = GridScrollbarMode.Shared; > gridControl1.VScrollBehavior = GridScrollbarMode.Shared; > gridControl1.UseSharedScrollBars = true; > gridControl1.VScrollBar.InnerScrollBar = vScrollBar1; > gridControl1.HScrollBar.InnerScrollBar = hScrollBar1; > > //shares gridcontrol2scrollbars > gridControl2.HScrollBehavior = GridScrollbarMode.Shared; > gridControl2.VScrollBehavior = GridScrollbarMode.Shared; > gridControl2.UseSharedScrollBars = true; > gridControl2.VScrollBar.InnerScrollBar = vScrollBar1; > gridControl2.HScrollBar.InnerScrollBar = hScrollBar1; > > >Here is a sample for implementing it. >36722forum.zip > >Regards, >Haneef > > > > >

Stephen
Replied On December 6, 2005 01:42 PM

Hi, how would I just share the horizontal scrollbar and keep the vertical scrollbars independent? Thanks. >Hi , > Please try this code and let me know if you need any other further assistance. > > //shares gridcontrol1scrollbars > gridControl1.HScrollBehavior = GridScrollbarMode.Shared; > gridControl1.VScrollBehavior = GridScrollbarMode.Shared; > gridControl1.UseSharedScrollBars = true; > gridControl1.VScrollBar.InnerScrollBar = vScrollBar1; > gridControl1.HScrollBar.InnerScrollBar = hScrollBar1; > > //shares gridcontrol2scrollbars > gridControl2.HScrollBehavior = GridScrollbarMode.Shared; > gridControl2.VScrollBehavior = GridScrollbarMode.Shared; > gridControl2.UseSharedScrollBars = true; > gridControl2.VScrollBar.InnerScrollBar = vScrollBar1; > gridControl2.HScrollBar.InnerScrollBar = hScrollBar1; > > >Here is a sample for implementing it. >36722forum.zip > >Regards, >Haneef > > > > >

stanleyj [Syncfusion]
Replied On December 7, 2005 12:06 AM

Hi Stephen, You can try out with different VScrollBars for different grids. Here is the modified sample. Best regards, Stanley

Stephen
Replied On December 16, 2005 07:31 PM

Hi, is there a way to make the scrollbars XP style? Thanks. >Hi Stephen, > >You can try out with different VScrollBars for different grids. Here is the modified sample. > >Best regards, >Stanley

Administrator [Syncfusion]
Replied On December 17, 2005 05:10 AM

If you are using .NET 1.1 or 2.0, then in your Main, you can enable themes for Windows Forms controls that support them (including scrollbars). [STAThread] static void Main() { Application.EnableVisualStyles(); Application.Run(new Form1()); }

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.

;