[Gtk-sharp-list] Data grid widget in Gtk#

Andrew York andy at brdstudio.net
Fri Dec 7 20:04:38 EST 2007


The treeview is much more flexible than the MS grid view and getting 
used to using it may take some time. If you are looking for a simple 
grid I suggest using the Gtk.TreeView with a ListStore to start out, if 
you are needing something more flexable you will be needing a TreeStore.

There is no "binding" object with a TreeView you will need to add the 
rows by iterating through the data. I had difficulty moving from the MS 
GridView to the TreeView at first managing the iter and path takes a bit 
of getting used to. Here is another useful link 
http://www.emcken.dk/weblog/archives/179-Mono-coding-Capturing-right-clicks-in-a-Gtk.TreeView.html

I hope this helps


Eric Miller wrote:
> Jacek Ruzyczka wrote:
>   
>> Hi folks,
>>
>> I've been searching for a grid view widget for use in my Gtk# project, just 
>> like the DataGrid in WinForms (let aside the database binding) or the JTable 
>> in Java, but haven't found anything. Is there a handy solution in Gtk# for 
>> presenting data in a versatile grid?
>>
>> Thank you.
>> Jacek Rużyczka
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>>     
>
> Funny you should ask. I was just looking for the same thing and couldn't 
> find much Googling for grid or list view. I was looking for the wrong 
> thing - the treeview will display as a grid/table or a tree.
>
> Here's the tutorial I found:
> http://www.mono-project.com/GtkSharp_TreeView_Tutorial
>
> Eric Miller
>
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20071207/dfb4d04e/attachment.html 


More information about the Gtk-sharp-list mailing list