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.

Scroll event

Thread ID:

Created:

Updated:

Platform:

Replies:

71464 Jan 31,2008 02:32 PM Feb 15,2008 06:40 AM Windows Forms 11
loading
Tags: GridControl
Daniel Santos de Carvalho
Asked On January 31, 2008 02:32 PM

In my application, i have a GridControl and a GridDataBoundGrid, both have the same size and are on the same panel, and i had the scrolls of the GridControl invisible.

I wanted to make an event that, when user moved the scrolls of the GridDataBoundGrid, the invisible scrolls of the GridControl moved the same way in the same time.

Is that possible???


SubhaSheela R [Syncfusion]
Replied On February 6, 2008 07:59 AM

Hi Daniel,

Thank you for using Syncfusion products.

You can set the scroll bars of GridDataBoundGrid to share with the GridControl by setting true to UseSharedScrollBars property which enables the shared scroll bar. After setting this, you can make the mode of the horizontal and vertical scroll bar behaviour as shared by setting Shared to GridScrollbarMode property. Finally, you can set the reference of GridDataBoundGrid to the reference of GridControl using InnerScrollBar property of HScrollBar and VScrollBar respectively. Below is the code snippet:

gridControl1.HScrollBehavior = GridScrollbarMode.Shared;
gridControl1.VScrollBehavior = GridScrollbarMode.Shared;
this.gridControl1.UseSharedScrollBars = true;
this.gridControl1.HScrollBar.InnerScrollBar = this.gridDataBoundGrid1.HScrollBar.InnerScrollBar;
this.gridControl1.VScrollBar.InnerScrollBar = this.gridDataBoundGrid1.VScrollBar.InnerScrollBar;


Please refer the sample available in the link below and let me know if it helps:

http://websamples.syncfusion.com//samples/Grid.Windows/F71464/main.htm

Regards,
Subhasheela R



Daniel Santos de Carvalho
Replied On February 7, 2008 08:03 AM

Yes, that was exactly what a wanted and worked very well.

But i still have a little problem, when i press the scrollbar to the left, it scrolls the grids one column to the left, but i have more columns in the GridDataBoundGrid than the number of columns in GridControl, and it makes the GridControl reach the end of the scrollbar first than the GridDataBoundGrid (even though they have the same size).

There is any way to scrolls the grids not by columns but by pixels???



SubhaSheela R [Syncfusion]
Replied On February 7, 2008 11:11 PM

Hi Daniel,

You can set HScrollPixel and VScrollPixel property of GridControl and GridDataBoundGrid control to true which enables the grid and gridataboundgrid table to scroll by pixel.
Below is the code snippet:

this.gridControl1.UseSharedScrollBars = true;
this.gridControl1.HScrollPixel = true;
this.gridControl1.VScrollPixel = true;
this.gridDataBoundGrid1.HScrollPixel = true;
this.gridDataBoundGrid1.VScrollPixel = true;


Regards,
Subhasheela R



Daniel Santos de Carvalho
Replied On February 8, 2008 09:44 AM

Thats great, it almost perfect for me. And work very well.

But now when i maximize the screen, the grid fill the panels they are in, and the scrolls disappear because the grids fill in completely, but when i turn the screen to normal size, and the scrolls reappear in the GridDataBoundGrid, and it don't work right, it is no longer bounded with the GridControl anymore.

How can i make for the property to bound both grids to work again???


SubhaSheela R [Syncfusion]
Replied On February 9, 2008 04:26 AM


Hi Daniel,

Thank you for using Syncfusion products.

I am not able to reproduce the issue of scroll bar disappearing while maximizing the form. I have set the Dock property to Fill for Panel control, but the scroll bars for GridDataBoundGrid appears and works when maximizing as well as minimizing it. Could you please modify the previous sample to reproduce the issue, so that I could provide you the exact solution? Or please send us your sample with issue, we will analyze it and provide you the details.

Please refer the video clip file available in the link below:

F71464FollowUpVideoFile.zip

Regards,
Subhasheela R



Daniel Santos de Carvalho
Replied On February 11, 2008 07:46 AM

Hi Subhasheela,

I changed the example you send me to try to explain my situation. I use both grid in differents panel and i fill the panels with them using the dock property.

In this modified example, if you maximize the screen, you will see that the horizontal scroll will disappear and the vertical scroll will not. When i turn the screen back to normal size again, the vertical scroll will still be working fine, but the horizontal scroll (that reappeared) will not work as before.

Can you help me to deal with this problem?

Ps: the version of the syncfusion i'm using is 4.1.0.50



GridScrollBar2.zip

SubhaSheela R [Syncfusion]
Replied On February 12, 2008 03:40 AM

Hi Daniel,

Thank you for using Syncfusion products.

You could set more number of columns in the GridDataBoundGrid Control before maximizing the form, so that you can view and work with the horizontal scroll bar for both the controls while maximizing as well as minimizing the form.

Please refer to the sample available in the link below and let me know if it helps:

http://websamples.syncfusion.com/samples/Grid.Windows/F71464FollowUp1/main.htm

Regards,
Subhasheela R


Daniel Santos de Carvalho
Replied On February 12, 2008 03:19 PM

Hi!!!

In my project, i can't change the number of cols in the grids. There is anyway to adjust the scrolls properties when the screen resize??? Or any way to make the scrolls never dissapear of the grid???


SubhaSheela R [Syncfusion]
Replied On February 14, 2008 06:45 AM


Hi Daniel,

Thank you for using Syncfusion products.

You can increase the default column width size by using DefaultColWidth property of GridDataBoundGrid Control after setting false to AllowResizeToFit property, so that scroll bars are visible and works well when maximizing as well as minimizing the form. Otherwise, we cannot force the scrollbars to visible in the form when maximizing it. Below is the code snippet:

this.gridDataBoundGrid1.DefaultColWidth = 500;


Please let me know if you have any questions.

Regards,
Subhasheela R



Daniel Santos de Carvalho
Replied On February 15, 2008 06:29 AM

Ok Subhasheela, i will modify my project a little bit to make that.

Thanks a lot for all your help!


SubhaSheela R [Syncfusion]
Replied On February 15, 2008 06:40 AM

Hi Daniel,

Thanks for your update. Please feel free to contact us if you have any other queries.

Regards,
Subhasheela R


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.

;