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. Image for the cookie policy date

GridDataBoundGrid scrollbars

How can I make sure that grid scroll bars show up exactly adjacent to the grid, rather than floating in space a couple of hundred pixels away? This is easy to do for a grid which never changes size (by setting grid size appropriately), but if grid size depends on what the grid happens to be doing at a given time, the scroll bars sometimes end up floating far from the last row or column.

4 Replies

AD Administrator Syncfusion Team February 28, 2003 08:44 AM UTC

Currently, the grid always starts its left side shwoing a full column. (Meaning the only place you ever see a partial column is on the right.) So, this can lead to some blank area between the last column and the scrollbar which is docked on the right edge of the grid's client area. So, the question for you is how do you want to get rid of this space. I can only think of two options (given that the left column cannot be a partial column). One is to make the last column width larger to occupy this empty region. This means the column width is dynamic so it fills the region. The other way might be to reduce the grid's client rectangle so the empty space is gone. But this would mean the scrollbars would jump around, and probably is not a good idea. It may also be more difficult to implement. If you want the right column to grow to fit the space, then this is discussed (with a sample) in this thread. http://www.syncfusion.com/forums/message.asp?MessageID=2699

BK bill korchinski February 28, 2003 01:13 PM UTC

Ok thanks. Actually the problem I'm having is with the scrollbar on the bottom. I can't find a way to make it close the empty space between itself and the rows above it when the number of rows cahnges.

AD Administrator Syncfusion Team February 28, 2003 11:46 PM UTC

Well, in that case, you probably want to adjust the clientrect. Attached is a little sample that shows how you might do this.

BK bill korchinski March 3, 2003 03:13 PM UTC

Thanks- WK

Live Chat Icon For mobile
Up arrow icon