Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » How to sort the ArrCtrl [SOLVED]
Re: How to sort the ArrCtrl [message #2276 is a reply to message #2275] |
Wed, 05 April 2006 18:03   |
 |
fudadmin
Messages: 1321 Registered: November 2005 Location: Kaunas, Lithuania
|
Ultimate Contributor Administrator |
|
|
luzr wrote on Wed, 05 April 2006 16:49 | Sorry, that is wrong. GetClickColumn returns the column, but only if you click at "cells".
What you need to use is WhenAction of HeaderCtrl::Column like this:
array.AddColumn("MyColumn").HeaderTab().WhenAction = THISBACK(SortByColumn);
BTW, quite handy here is using THISBACK1, because that way you can pass column index:
void MyApp::SortColumn(int column)
{
array.Sort(i);
}
.....
array.AddColumn("MyColumn1").HeaderTab().WhenAction = THISBACK1(SortByColumn, 0);
array.AddColumn("MyColumn2").HeaderTab().WhenAction = THISBACK1(SortByColumn, 1);
Mirek
|
Mirek,
You have been faster than me!
You have too much free time...
...
|
|
|
Goto Forum:
Current Time: Fri Jul 18 09:54:42 CEST 2025
Total time taken to generate the page: 0.03464 seconds
|