[Mono-list] GTK# & DataBindings

Daniel Morgan danielmorgan@verizon.net
Wed, 28 Jul 2004 19:31:27 -0400

To add "data binding" capabilities to any object, you should use the
interfaces and classes in the System.ComponentModel namespace.  Since
they are in the System.dll assembly, it pretty much will be available to
any complex beast like ASP.NET, System.Windows.Forms, GTK#, etc...  

If you at DataView and DataRowView and their interfaces, such as,
You will notice it has the method:  

PropertyDescriptorCollection ITypedList.GetItemProperties
(PropertyDescriptor[] listAccessors) 

When you data bind a DataView to a DataGrid, the method above gets
called.  PropertyDescriptorCollection in this instance contains a
collection of DataColumnPropertyDescriptors.
DataColumnPropertyDescriptor is a class in System.Data, and the class
inherits from PropertyDescriptor.  Both PropertyDescriptorCollection and
PropertyDescriptor are classes in System.ComponentModel.  Thus, if you
wanted to take advantage of data binding between a System.Data DataTable
and a GTK# TreeView, you would use these interfaces and classes.  

For the data readers, take a look at interface ICustomTypeDescriptor
and the classes System.Data.Common.DbRecord and

For an example of data binding from a DataTable to a GTK# TreeView -
ListModel, see 
Sqlsharpgtk/DataGrid.cs  This is not true data binding; it is more like
data loading. 
See methods DataBind() and GetResolvedDataSource().

Interesting articles:







I know Gonzalo and Vlad had attmpted to create a "data binding" model
for GTK#; however, I do not know how far they got.

-----Original Message-----
From: mono-list-admin@lists.ximian.com
[mailto:mono-list-admin@lists.ximian.com] On Behalf Of Miguel de Icaza
Sent: Tuesday, July 27, 2004 7:25 PM
To: Xiii29; mkestner@ximian.com
Cc: mono-list
Subject: Re: [Mono-list] GTK# & DataBindings


> As I come from the WinForms World, I'm wondering if there is a way to 
> do databindings with Gtk# ?
> Or if there is another way to do IHM with Mono !

Sadly this is a feature that is not implemented in Gtk# today.

We wanted to provide this, but it has not yet materialized.

Mono-list maillist  -  Mono-list@lists.ximian.com