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: Repaint bug?
GridCtrl: Repaint bug? [message #43166] Sun, 25 May 2014 10:05 Go to next message
forlano is currently offline  forlano
Messages: 1071
Registered: March 2006
Location: Italy
Experienced Contributor
Hello,

I have a gridctrl that is sorted via a multisort each time it is feeded.
Unfortunately the grid is multisorded ONLY the first time.
Look at the first picture:
I click the left grid (third row) and some data go in the right grid that is sorted as I want with this code in the callback

...
arrPlayer.MultiSort(1, GridCtrl::SORT_DOWN)
	     .MultiSort(2, GridCtrl::SORT_DOWN)
	     .MultiSort(0, GridCtrl::SORT_UP);
arrPlayer.Repaint();            
...

index.php?t=getfile&id=4543&private=0

Now, if I repeat the same operation (Clear the grid and feed again with the same data) I get this result

index.php?t=getfile&id=4544&private=0
So the TB column (the second one to be sorted) is not sorted properly.
I do not know if this is a Repaint() problem or I need to restart/reset in some way the grid in order to be ready to perform a new multisort.

Thanks,
luigi
  • Attachment: pic1.png
    (Size: 14.05KB, Downloaded 264 times)
  • Attachment: pic2.png
    (Size: 13.29KB, Downloaded 240 times)
Re: GridCtrl: Repaint bug? [message #43167 is a reply to message #43166] Sun, 25 May 2014 10:13 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1071
Registered: March 2006
Location: Italy
Experienced Contributor
Solved! Cool

After posting I had one more idea to test and it worked. The code

arrPlayer.MultiSort(1, GridCtrl::SORT_DOWN)
.MultiSort(2, GridCtrl::SORT_DOWN)
.MultiSort(0, GridCtrl::SORT_UP);

should be placed in the constructor and not in the calback.
The callback instead must contain the line

arrPlayer.ReSort();

Re: GridCtrl: Repaint bug? [message #43168 is a reply to message #43167] Sun, 25 May 2014 23:20 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1355
Registered: November 2005
Location: Poland
Senior Contributor

So everything is ok? Smile
Re: GridCtrl: Repaint bug? [message #43270 is a reply to message #43168] Sat, 21 June 2014 08:37 Go to previous message
forlano is currently offline  forlano
Messages: 1071
Registered: March 2006
Location: Italy
Experienced Contributor
unodgs wrote on Sun, 25 May 2014 23:20
So everything is ok? Smile


Sorry, I have not seen your reply.
Yes it works great!

Thank you,
Luigi
Previous Topic: Hide cell content with '*' symbol in GridCtrl
Next Topic: GridCtrl: custom ButtonOption inside a cell
Goto Forum:
  


Current Time: Fri Nov 22 17:20:45 CET 2019

Total time taken to generate the page: 0.02188 seconds