[pygtk] treeview returns wrong values after sorting
wout clymans
woutclymans at scarlet.be
Sun Aug 13 17:54:17 WST 2006
Hello,
In my application there is a treeview that can be sorted using this method:
/ def __init__()
self.column = gtk.TreeViewColumn("Name", self.renderer, markup=2)
self.column.set_sort_column_id(2)
self.treeview.append_column(self.column)/
/ def sort_name(self, *args):
self.model.set_sort_column_id(2,gtk.SORT_ASCENDING)
/After the treeview has been sorted, i need to get the value from the
selected row.
I used this method for getting the value:
/name = self.model.get_value(self.iter[id], 2)
/but this return the value from the treeview BEFORE it was sorted.
So how can i get the correct value from the selected row if the treeview
is sorted?
Thanks
Wout
More information about the pygtk
mailing list