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.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

115146 Dec 30,2013 06:44 AM Jan 10,2014 04:48 AM Windows Forms 3
loading
Tags: GridControl
Shashi Bhushan Kumar
Asked On December 30, 2013 06:44 AM

Hi,
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 06:58 AM

Hi Shashi,

 

Thank you for using Syncfusion Products.

 

Query:

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:

 

http://www.syncfusion.com/uploads/user/directTrac/116859/CS1271737053.zip

 

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.

 

Regards,

Karuppasamy C.


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

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
        this.gridGroupingControl1.TableControl.VScroll

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

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

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.

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.

;