Question

I have rows of data in a wxGrid, each row has a different index. I want to be able to filter data based on column values. Is there an efficient method or practice to do this?

If I have to do it all by hand, I was thinking I would I just gather all grid data into a list, manipulate it as a list then clear and resize the grid, and add the list to the grid. Does anyone have a more efficient way?

Thanks!

Était-ce utile?

La solution

Not really. You would basically have to roll your own. On the other hand, you might be able to use the ObjectListView widget, which is a wrapper for the wx.ListCtrl instead. It has filtering built-in:

I also find the ObjectListView widget to one of the easiest to use widgets out there. Sadly it's not included with wxPython as of yet, but you can get it here:

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top