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

How to check whether Vertical Scroll Bar is visible or not ?

Thread ID:





115146 Dec 30,2013 11:44 AM UTC Jan 10,2014 09:48 AM UTC WinForms 3
Tags: GridControl
Shashi Bhushan Kumar
Asked On December 30, 2013 11:44 AM UTC

I am using GGC and attached DataTable to it's DataSource. Iwant to check whether Vscroll baar get visible or not ? I used if (gridGroupingControl1.TableControl.VScroll) to get VScroll visible status but it returning false at load time after attaching DataSource and after GGC get displayed and then we tried to get VScroll Status in Resize event of GGC then it working fine. but i want the status of VScroll on load time after DataSource attached so that i can calculate exact client width of GGC for rendering columns.
Any solution to achieve this ?

Karuppasamy C [Syncfusion]
Replied On January 2, 2014 11:58 AM UTC

Hi Shashi,


Thank you for using Syncfusion Products.



To find visibility of vertical scroll in GGC


We have analyzed your query at our end. We would like to suggest the property  VScrollVisible which is used to find visibility of vertical scroll in GGC.Please refer the below sample,


Sample Link:




After I gone through your query, I have found that you have to calculate client width of GGC.

Please make use AllowProportionalColumnSizing property in GGC which leads to achieve your requirement in simplest manner.



Please let me know if you have any concerns.



Karuppasamy C.

Shashi Bhushan Kumar
Replied On January 6, 2014 05:21 AM UTC

Hi Karuppasamy C  , thank u for reply.
The solution u have provided is working correct but i want Vertical Scroll Bar visible status at the form load after the attaching the dataSource of GGC. When i use

to get visible status of VScroll then it always give False even GGC has VScroll.

Karuppasamy C [Syncfusion]
Replied On January 10, 2014 09:48 AM UTC

Hi Shashi,

Thank you for your update.

If you want to catch the visibility of vertical or horizontal scroll bar . you can use the conditions below as you already know

Code 1:

 if (this.gridDataBoundGrid1.VScroll)
// code
          else if(this.gridDataBoundGrid1.HScroll)
// code

But before that you should enable or disable the any one of the scroll bars, based on these enable / disable conditions the above if loop conditions works. Here I have  enabled the  horizontal scroll and disabled the vertical scroll.therefore the  second  condition alone works.

Code 2:

this.gridDataBoundGrid1.VScrollBehavior =Syncfusion.Windows.Forms.Grid.GridScrollbarMode.Disabled;
this.gridDataBoundGrid1.HScrollBehavior = Syncfusion.Windows.Forms.Grid.GridScrollbarMode.Enabled;

Thanks & Regards,
Karuppasamy C.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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