Hi,
This is a tricky one to explain, so I'll try my hardest with diagrams.
Assume you've got a very big grid, with say, 4 levels of parent/child bands.
Now when scrolling down, the parent level (red and blue) is out of view, leaving the items shown in the final child band.
What I want, is when the top row is in the 4th band, fix the parent (red) band rows to the top of the grid, almost like a "floating" row. The sibling rows of the parent bands still appear to scroll, and the "top floating" band gets replaced when the set of topmost rows hits the next band.
I'm sure there's a better name for this, and a better explanation!
Thanks, Tom
Hi Tom,
That's an excellent description and I understand exactly what you mean. But unfortunately, the answer is no, the WinGrid does not have this functionality.
Thanks Mike!
I have now implemented a contextual helper which runs on AfterRowRegionScroll, it examines the FirstRow of the scroll region, then recursively set the context based upon the FirstRow's level. This works very well, but I've noticed when scrolling with the mousewheel (having anything in the AfterRowRegionScroll event that updates the UI), stops the grid from scrolling smoothly.
This does not happen when grabbing the scroll bar thumb and moving it up and down (it updates the screen immediately).
I've used SuspendLayout etc (I'm very familiar with these types of problems), but I'm thinking the grid fires AfterRowRegionScroll a *lot* more when using the mouse delta?
UPDATE: I've just logged the ScrollPosition to the debug window. When using the Mouse Wheel, it sets the scroll position sequentially, irregardless of it's position, so 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 etc. When using the thumb from the scrollbar, it jumps, so 1, 5, 7, 10, meaning my UI is doing a lot less work!
Not sure how to solve this :|