[Gtk-sharp-list] Dynamic from SQLite popuplated Treeview mad editable
atomikramp at email.it
Thu Aug 26 10:01:14 EDT 2010
> Yes that is what I wanted to do. The Problem with this is that I don´t
> have the columname in the edited method or I don´t know how to get it.
> As I can see ther is no args Property that gives me the columname, only
> Rownumvers and the edited Text.
Probably i'm dumb but i don't understand this.
you are populating a treeview by using a sqlite database, so basically you
do select statements to populate the treeview.
if you have a table in your sqliteDB that is something (for example) like
DVD(id, title, year, lenght, ....)
and you want to edit a movie that is like
DVD(1, "toy story 3", 2010, 120, ....)
and you want to edit the title you can do
int movieid = (int)((TreeView)obj_sender).Model.GetValue(argv.Iter, 0) //
you obtain the id of the movie you are editing
and then you perform your query
UPDATE DVD SET lenght="90" WHERE id=movieid
View this message in context: http://mono.1490590.n4.nabble.com/Dynamic-from-SQLite-popuplated-Treeview-mad-editable-tp2339518p2339788.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.
More information about the Gtk-sharp-list