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.
ADAdministrator Syncfusion Team February 28, 2003 03:44 AM
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.
BKbill korchinskiFebruary 28, 2003 08:13 AM
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.
ADAdministrator Syncfusion Team February 28, 2003 06:46 PM
Well, in that case, you probably want to adjust the clientrect. Attached is a little sample that shows how you might do this.