Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl and sort at runtime
Re: GridCtrl and sort at runtime [message #8299 is a reply to message #8298] |
Thu, 01 March 2007 15:49   |
|
forlano wrote on Thu, 01 March 2007 08:20 | I've put some data in a GridCtrl and now I would like to sort it. I do not want give to the user the possibility to sort the GridCtrl because I need to do it one time for all.
With the arrayctrl I had the command arrayctrl.Sort(column). Is there something equivalent (ascending/descending) for gridctrl?
A workaround is to sort the data before to insert them.
|
Yes, you can - but not so easy. Something to add in the new release. Now you can use GSort method (it's private so make it public first).
void GSort(int col, int order, int from, int count)
to sort the all rows:
grid.GSort(my_column, 0, grid.GetFixedCount(), grid.GetCount());
order can be 0,1 - less, 2 - greater
I will add simpler interface (similar to arrayctrl) in the next rc or final.
After sort call Repaint() to refresh the grid
[Updated on: Thu, 01 March 2007 15:51] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Tue Jul 08 11:38:02 CEST 2025
Total time taken to generate the page: 0.02682 seconds
|