Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Problem w/ toprow reverting to top when scrollbar disabled

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

Problem w/ toprow reverting to top when scrollbar disabled
Link Posted: 20-Dec-2006 06:06
To see, modify the VirtualGridForm and disable the vertical scrollbar in fillgridbtn_click()
virtualGrid.ActivePort.VScrollBarEnabled = False

Run the demo form, fill w/ 10,000 rows, scroll way down and then resize the form.

Problem: As soon as the form is resized, the toprow reverts to 1 (and no toprow changed event is raised).

If the scrollbar is enabled, this behavior does not appear.
Link Posted: 21-Dec-2006 05:03
Any good word? We are to freeze code 12/31 and need this fixed and in to QA before then.
Thank you.
Link Posted: 21-Dec-2006 21:32
Sorry for delays with answer - we're preparing nearest update of FlyGrid that will include fix of this problem.
Link Posted: 22-Dec-2006 04:37
[quote="NineRays"]Sorry for delays with answer - we're preparing nearest update of FlyGrid that will include fix of this problem.


Thanks, Victor. I'll be watching RSS.  Hope you have a good Christmas.

Mark
Link Posted: 24-Dec-2006 14:08
Thanks
Please download the latest (today) of FlyGrid, this problem fixed in this update.
Link Posted: 28-Dec-2006 06:51
Hi Victor,

I downloaded and installed 1.4.1.22 (circa 12/24/2006) and am trying it out.
When VScrollBarEnabled = True and I scroll down and then resize the form, the grid simply repaints the currently viewed area respecting the new size. This is regardless of which row is currently selected. This is the desired behavior. If I selected row #3 (click on it) and then use my mousewheel to scroll down to view row 100 (not selecting that row, just viewing it) and resize the form, row 100 remains in the viewing pane.

When VScrollBarEnabled = False and I scroll down and then resize the form, the grid repositions the view pane to show the currently selected row. So, if I selected row #3 and then scrolldown using my mousewheel and I now see row 100, as soon as I resize the form, the grid snaps the viewing area back to show row #3.

Using the virtualGridForm in the demo code and changing vScrollBarEnabled to False should demonstrate this.

Note: After installing, the version of NineRays.FlyGrid.dll is 1.4.1.22 dated 12/25/2006. However,looking at the source files I don't see any modified after 12/20/2006 (apart from the SLN). Perhaps the fix didn't get into the build?
Link Posted: 04-Jan-2007 13:01
bump
Link Posted: 05-Jan-2007 10:28
bump bump
Link Posted: 16-Jan-2007 09:33
Downloaded 1.4.1.27 - still broken. In viewing my problem description above, I believe I left out some details.
To reproduce, in the demo vb code, modify the VirtualGridForm and disable the vertical scrollbar in fillgridbtn_click():

virtualGrid.ActivePort.VScrollBarEnabled = False

Run the demo form, fill w/ 10,000 rows, scroll way down *using your mousewheel so that the row currently selected does not change*, then resize the form.

Problem: As soon as the form is resized, the visible toprow reverts to 1 (and no toprow changed event is raised).

If the scrollbar is enabled, this behavior does not appear, the active visible row remains visible.

Note: In my original post, I think I left out this important detail: The currently selected row must remain unchanged; e.g. row 1. The user then scrolls the viewable rows down (using mousewheel). So the state of the grid is this: The current row is near the top, but the currently viewed row is much further down. Then, on resize the grid snaps the current row into view. It does not snap the row into view if VScrollBarEnabled = True. We desire for it not to snap the current row into view on resize.

So, to summarize: When VScrollBarEnabled=False and the user scrolls the currently selected row out of view using a mousewheel and the form is resized (and grid repainted), the currently selected row snaps back into view. This is not good. When VScrollbarEnabled=True and the user scrolls the currently selected row out of view using either the mousewheel or scrollbar and the form is resized (and grid repainted), the viewport remains on whichever rows were in view prior to the resize, regardless of the currently selected row.

Sorry for missing that information before. Please let me know if you cannot reproduce or need more information. Thank you for helping us get this resolved.
Link Posted: 17-Jan-2007 08:30
Thanks for the additional comment, hope we'll fix this problem to the end of this week.