Closed robcecil closed 6 years ago
Are you using frozen rows when having this issue? I am trying a few things to reproduce the error and see that frozen rows can cause issues with scrolling (to the frozen row).
Yes I am. Should have thought of that! So I should instead just compute the proper row and try scrolling to that?
I am testing out a few things, but scrolling right now doesn't seem to work as expected when using headers. I will also see about adding the ability to explicitly set the offset.
I have released version 0.5.2 which addresses the scrolling issue mentioned here. You should now be able to scroll to frozen columns/rows as well as use positional items to scroll properly. I have also exposed setting the content offset manually for greater control. Please test and let me know if you have issues still.
Okay, just to be clear, I should be able to scroll to 0,0,0 and not have worry about frozen rows or cells, ... it will just figure it out and do it ?
Yep, it should take into account the real/correct position of the frozen row and scroll to that origin.
Works great. Thanks!
@nlampi
FYI, looks like you have a print() statement somewhere, print something like this:
***(0.0, 0.0, 105.0, 40.0)
Hello @nlampi I am trying to scroll to the top of the grid via:
self.dataGridView.scrollToCellAtIndexPath(IndexPath(forSGRow: 0, atColumn: 0, inSection: 0), atScrollPosition: .top, animated: true)
But it won't budge.
I previously tried setting scrollsToTop to true, but i have other UIScrollViews in the main interface and I think that would be an issue. So, I am trapping taps on the status bar, and my app's main toolbar and manually calling the method above.
Any ideas?
Thanks