![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Scrolling grid, locking header row Hi, What would be the best approach to take with this problem? I have a grid that needs to be able to scroll both horizontally and vertically, as it could conceivably be bigger in than the viewport in either direction. Please see: http://nrkn.com/files/images/scrollingGrid.png The problem is, the header row needs to be fixed. That is, when the grid is scrolled horizontally, the header moves with the rest of the grid so that the columns still line up, but when it is scrolled vertically the header stays put so that it is always visible. The only thing I can come up was using two grids in a horizontal-only scrollviewer with SharedSizeGroup for the columns and then putting the content rows in a vertical-only scrollviewer, problem is that having them both in the horizontal scrollviewer means having to scroll the the right of the grid in order to get to the vertical toolbars. Is there a way to take a ScrollViewer with no visible scrollbars, and link it to a <scrollbar> elsewhere that then acts exactly like the vertical scrollbar of the scrollviewer should? |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Scrolling grid, locking header row Nik Coughlin wrote: > Hi, > > What would be the best approach to take with this problem? I have a > grid that needs to be able to scroll both horizontally and > vertically, as it could conceivably be bigger in than the viewport in > either direction. Please see: > > http://nrkn.com/files/images/scrollingGrid.png > > The problem is, the header row needs to be fixed. That is, when the > grid is scrolled horizontally, the header moves with the rest of the > grid so that the columns still line up, but when it is scrolled > vertically the header stays put so that it is always visible. > > The only thing I can come up was using two grids in a horizontal-only > scrollviewer with SharedSizeGroup for the columns and then putting the > content rows in a vertical-only scrollviewer, problem is that having > them both in the horizontal scrollviewer means having to scroll the > the right of the grid in order to get to the vertical toolbars. > > Is there a way to take a ScrollViewer with no visible scrollbars, and > link it to a <scrollbar> elsewhere that then acts exactly like the > vertical scrollbar of the scrollviewer should? private void ScrollChanged(object sender, RoutedEventArgs e){ HeaderRow.ScrollToHorizontalOffset(DataRows.HorizontalOffset); } |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Trying to play GRID....need help please! | Gaming | |||
| Vertical scrolling...jumps rather than smooth scrolling - Excel 20 | Vista hardware & devices | |||