[Gtk-sharp-list] Treeview, delete the selected row (can't get it done :( )
count.cb at gmx.net
Fri Jun 27 04:18:15 EDT 2008
> TreeIter iter;
> TreeModel model;
> TreePath path = ((TreeSelection)sender).GetSelectedRows();
> this.klantListStore.GetIter(out iter, path);
> klantListStore.Remove(ref iter);
The Exception is in the OnButton2Clicked Method.
Is the code you posted above inside this OnButton2Clicked Method?
If yes, sender is the button you clicked on. So you tried to cast a button
to a TreeSelection. That's why you get a InvalidCastException.
View this message in context: http://www.nabble.com/Treeview%2C-delete-the-selected-row-%28can%27t-get-it-done-%3A%28-%29-tp18144085p18150331.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.
More information about the Gtk-sharp-list