Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl BUG ??
GridCtrl BUG ?? [message #57130] Fri, 28 May 2021 12:00 Go to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hello,

In one of my apps from time to time I stumble on a problem and I finally took time to narrow down the problem.

The bug is the following :


  • fill GridCtrl with several lines
  • filter lines in order to keep only a few ones ==> everything is OK ( and GetCursor() returns the absolute index : same as without filtering)
  • sort on one column (the displayed order must change) ==> visually everything is OK ... BUT method .GetCursor() does not return the right value : it points on undisplayed lines ??

I would expect it to return: the display position (as visible) or the index of the line (before filtering and sorting) ==> it returns the position in the sorted order

The problem is that when using Get(GetCursor(), ID) ... it doesnt return the expected line Confused

[Updated on: Fri, 28 May 2021 12:04]

Report message to a moderator

Re: GridCtrl BUG ?? [message #57133 is a reply to message #57130] Sat, 29 May 2021 00:01 Go to previous message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Don't bother, I figured it out.

GetCursor() or GetCurrow() return the same value, I have to use GetRowId() instead to get what I want : it returns asolute index (independantly of filtering and sorting)
Previous Topic: scrollbar
Next Topic: Auto adjust row height in GridCtrl?
Goto Forum:
  


Current Time: Sat Apr 20 06:25:10 CEST 2024

Total time taken to generate the page: 0.03169 seconds