# GridTableBase

**URL:** <https://www.ruby-forum.com/t/gridtablebase/175180>\
**Category:** wxRuby\
**Created:** [September 9, 2009, 11:19am UTC](https://www.ruby-forum.com/t/gridtablebase/175180 "2009-09-09T11:19:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hendra\_kusuma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/5f8ce5/32.png) [@hendra\_kusuma](https://www.ruby-forum.com/u/hendra_kusuma)\
**Post date:** [September 9, 2009, 11:19am UTC](https://www.ruby-forum.com/t/gridtablebase/175180/1 "2009-09-09T11:19:02Z")

</div>

Dear all,

I do pretty well with grid, create\_grid and set\_grid\_value  
but then I figure GridTableBase  
I plan to use it with sqlite3  
I read the doc and cannot understand how to use it

can anyone post here (or point a link)  
code sample or tutorial  
about GridTableBase?  
cannot find on google

btw, I read that I should only use GridTableBase  
with a lot of data  
how many is a lot?  
My data is above 1000 rows below 10000. Is it a lot?

Thank you  
Regards  
Hendra

---

<div class="post-metadata">

**Author:** ![hendra\_kusuma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/5f8ce5/32.png) [@hendra\_kusuma](https://www.ruby-forum.com/u/hendra_kusuma)\
**Post date:** [September 9, 2009, 11:38am UTC](https://www.ruby-forum.com/t/gridtablebase/175180/2 "2009-09-09T11:38:21Z")

</div>

Hi

hendra kusuma wrote:

> can anyone post here (or point a link)  
> code sample or tutorial  
> about GridTableBase?  
> cannot find on google

There’s a complete example in the samples in the wxruby distribution:

[http://wxruby.rubyforge.org/svn/branches/wxruby\_2\_0\_stable/samples/grid/gridtablebase.rb](http://wxruby.rubyforge.org/svn/branches/wxruby_2_0_stable/samples/grid/gridtablebase.rb)

> btw, I read that I should only use GridTableBase  
> with a lot of data  
> how many is a lot?  
> My data is above 1000 rows below 10000. Is it a lot?

Not necessarily. One reason to use GridTableBase is if loading all the  
data at once and creating all the grid cells is too slow, or takes up  
too much memory. What’s “slow” or “too much” is your judgement.

I’ve come to also like using GridTableBase as a nicer way to connect to  
a data model to a GUI view, even where the efficiency is not a problem.

alex

---

<div class="post-metadata">

**Author:** ![hendra\_kusuma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/5f8ce5/32.png) [@hendra\_kusuma](https://www.ruby-forum.com/u/hendra_kusuma)\
**Post date:** [September 10, 2009, 4:57am UTC](https://www.ruby-forum.com/t/gridtablebase/175180/3 "2009-09-10T04:57:30Z")

</div>

I think I get it. I create inherit class that provide 2 dimension array  
as  
data,  
and put some info like column name, numbers etc  
then assign it to grid using set\_table

Wish someone has create a class able to convert dbi resultset into  
GridTableBase  
guess I have to do it myself

Thank you

Regards  
Hendra
