[Gtk-sharp-list] Get Parent Iter from Treeview

Coral Lights corallights at gmail.com
Tue Feb 24 11:08:24 EST 2009


Quickly using the example code from the Mono tutorials:

Gtk.TreeIter iter = musicListStore.AppendValues ("Dance");
musicListStore.AppendValues (iter, "Fannypack", "Nu Nu (Yeah Yeah)
(double j and haze radio edit)");

iter = musicListStore.AppendValues ("Hip-hop");
musicListStore.AppendValues (iter, "Nelly", "Country Grammer");

In my own project I understand how to grab the currently selected tree row,
but how can I also get the value for the  parent?

Basically, like in this example if the user selected the row with the value
"FannyPack", I would also like to be able to get the parent "Dance" value.
Or, if "Nelly" is the row selected, I only want also its parent's value "Hip

I've tried multiple methods, but to failure to just grab the single parent
node value.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20090224/5f7f17ec/attachment-0001.html 

More information about the Gtk-sharp-list mailing list