Here is a screenshot for creating a GTK# DataGrid based on a TreeView using
the ListStore TreeModel.

It still needs to be heavily modified to become its own GTK# gtk widget
though.  It will inherit from a TreeView.  The widget also needs to be
generalized by moving the data binding stuff to a base class so other GTK#
widgets can data bind to a data source magically too.  The goal is to make a
GTK# DataGrid with similar functionality found in a
System.Web.UI.WebControls.DataGrid and System.Windows.Forms.DataGrid.

It currently is in mcs cvs at mcs/tools/SqlSharp/gui/gtk-sharp.

It requires the latest mcs, mono, and gtk-sharp built from cvs.

I have only tested it with GTK# on mono on Windows though.

Even though the sample uses SqlClient to connect to a database, you can
modify the DataGrid.cs file to populate the DataTable without a database
connection.

<<attachment: GtkSharpDataGridScreenshot.png>>

Reply via email to