sort wxgrid

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
guzzi_jones
Experienced Solver
Experienced Solver
Posts: 81
Joined: Sun Dec 08, 2013 3:50 am

sort wxgrid

Post by guzzi_jones » Tue Dec 31, 2013 2:43 am

Is there a good sample of sorting a wxgrid ascending and descending in wxgrid 2.8 using c++.
Thanks.
I am learning a lot.

User avatar
doublemax
Moderator
Moderator
Posts: 15289
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: sort wxgrid

Post by doublemax » Wed Jan 01, 2014 12:03 pm

I don't know any sample for this. First you should check if wxDataViewCtrl is not a better suitable control for you (only available in wx 3.0 though), as it supports sorting my columns already.

The standard wxGridTable does not support sorting, so you would have to derive your own class from wxGridTableBase and implement the sorting yourself.
http://docs.wxwidgets.org/2.8.12/wx_wxg ... dtablebase
Use the source, Luke!

Post Reply