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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

shared scroll bars

Thread ID:

Created:

Updated:

Platform:

Replies:

36722 Nov 8,2005 11:48 PM UTC Dec 17,2005 10:10 AM UTC WinForms 6
loading
Tags: GridControl
Jason Talaban
Asked On November 8, 2005 11:48 PM UTC

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 08:34 AM UTC

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 05:22 PM UTC

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 06:42 PM UTC

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 05:06 AM UTC

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

Stephen
Replied On December 17, 2005 12:31 AM UTC

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 10:10 AM UTC

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.

Warning Icon 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.Close Icon

;