GridTableBase

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

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

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

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