Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl BUG ??
GridCtrl BUG ?? [message #57130] |
Fri, 28 May 2021 12:00  |
Didier
Messages: 726 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
[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  |
Didier
Messages: 726 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)
|
|
|
Goto Forum:
Current Time: Wed May 14 22:39:21 CEST 2025
Total time taken to generate the page: 0.00646 seconds
|