On Mon, Mar 15, 2010 at 1:35 PM, Alex Fenton <alex at pressure.to> wrote:
> Hi Hendra
>
>
> On 15/03/2010 04:53, hendra kusuma wrote:
>
>> How do I use gridtablebase to display record I get from sql?
>>
>> I try to follow the help and sample,
>> but I don''t understand how to combine the sql data
>>
>> sample code would be good
>>
>
> Someone else may have some code to offer, but I''m afraid most
people don''t
> have time to write a complete code sample. Your class should inherit from
> Wx::GridTableBase and there''s a set of method that your class must
provide
> to provide the SQL results to the table.The documentation is there; the
> sample has some comments and can be used as a template. It''s
probably worth
> looking at it again, understanding what each method is doing, then having a
> go yourself. If you get stuck on something specific, I''d be happy
to help.
>
> best
> alex
>
>
Thank you Alex, you are always helpful
I finally figure it out
so to put it simpy, all I need is 2 dimension array of my sql result
and put it in
def get_value(row, col)
(sql_result[row])[col].to_s
end
I found that each time i modify sql result
I need to recreate the object
to avoid error caused by difference in row number
well, thats enough for the time being :)
Thank you
Regard
Hendra
--
Suka linux?
Kunjungi blog saya http://penguinroad.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://rubyforge.org/pipermail/wxruby-users/attachments/20100315/86013dac/attachment.html>