[Gtk-sharp-list] Ways of supporting complex data binding in TreeView

Chas chastamar at yahoo.com
Tue May 31 15:31:28 EDT 2005

Todd Berman <tberman at off.net> wrote:

Oh, thats the best part of writing a managed TreeModel implementation.
gtk+ would ask your TreeModel for the data, so you wouldn't have to do
much else to get it to work. In fact, Vlad has written a DataTableModel
that is all managed code that works using DataSet not ITypedList, if you
look at the archives to this list, I am sure you can find it.

Yes, I'm familiar with that code (assuming you mean the one that works with DataTable). It basically keeps references to the data, translating iters to rows. (Native to managed call for each column's value is still required). Come to think of it though, this implementation is a bit better than my suggestion for a referencing ListStore - getting the value from the model is nicer than using CellDataFunc. Sadly, I don't recall right now if there was a reason that I chose otherwise...

Also, I prefer to rely on the interfaces (ITypedList, IBindingList) and not specifically on classes such as DataTable or DataSet because it allows the data binding to be used with other types of data sources, including custom ones. That's also the reason I think the data binding should not rely on the DataSet class, but on the aforementioned interfaces - and expose another sugary interface above it for usage with DataSet if that is required.

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://galactus.ximian.com/pipermail/gtk-sharp-list/attachments/20050531/b9105dc1/attachment.html

More information about the Gtk-sharp-list mailing list