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, ITypedList. 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 System.Data.Common.DbEnumerator. 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: http://www.thecodeproject.com/cs/miscctrl/customizingcollectiondata.asp http://www.alexander-jung.net/databind/databinding_eng.htm http://weblogs.asp.net/fbouma/articles/115837.aspx http://www.dnzone.com/ShowDetail.asp?NewsId=227 http://www.dnzone.com/ShowDetail.asp?NewsId=228 http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=0 de57912-d3bb-4118-b62f-179642b01df5 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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Miguel de Icaza Sent: Tuesday, July 27, 2004 7:25 PM To: Xiii29; [EMAIL PROTECTED] Cc: mono-list Subject: Re: [Mono-list] GTK# & DataBindings Hello! > 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. Miguel. _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
