# How do I allow user to select single cell instead of a row

**URL:** <https://www.ruby-forum.com/t/how-do-i-allow-user-to-select-single-cell-instead-of-a-row/132240>\
**Category:** Ruby-Gnome 2\
**Created:** [March 18, 2008, 8:20am UTC](https://www.ruby-forum.com/t/how-do-i-allow-user-to-select-single-cell-instead-of-a-row/132240 "2008-03-18T08:20:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shinwoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@shinwoo](https://www.ruby-forum.com/u/shinwoo)\
**Post date:** [March 18, 2008, 8:20am UTC](https://www.ruby-forum.com/t/how-do-i-allow-user-to-select-single-cell-instead-of-a-row/132240/1 "2008-03-18T08:20:32Z")

</div>

I am creating a grid like treeview, using liststore as the model. So, I  
set the row to the grid row and each col to the grid column. So, I can  
easily get the cell(row, col) using hte listore.

After showing the treeview, I found that I can’t allow the user to  
select single cell, they only allow to select single row. How can I  
change this behaviour? I already try all the Treeview#selection mode but  
neither meet my requirement.

I am thinking to use the treestore and map the row to a parent and all  
the column to a child. But I still have problem on showing its  
appearance as a gridview.

Can anyone help me on this? I just want to make a simple grid view but  
It seems really hard to do using GTK. I can done it easily with the C#  
GridView but not on this Gtk. May be WxRuby is easier to draw a grid  
view?

Regards,  
Shin Guey

---

<div class="post-metadata">

**Author:** ![shinwoo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/df705f/32.png) [@shinwoo](https://www.ruby-forum.com/u/shinwoo)\
**Post date:** [March 18, 2008, 5:11pm UTC](https://www.ruby-forum.com/t/how-do-i-allow-user-to-select-single-cell-instead-of-a-row/132240/2 "2008-03-18T17:11:47Z")

</div>

On Tue, Mar 18, 2008 at 08:20:32AM +0100, Shin guey Wong wrote:

> After showing the treeview, I found that I can’t allow the user to  
> select single cell, they only allow to select single row. How can I  
> change this behaviour? I already try all the Treeview#selection mode but  
> neither meet my requirement.

The fundamental problem is GtkTreeView does _not_ support grid  
selection. This is why programs like Gnumeric, etc implement their own  
custom grid widget. It’s one of the most requested missing  
widget/feature in gtk+, IMHO.

-pete
