[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gambas-user
Subject:    Re: [Gambas-user] Slow Gridview creation
From:       Fabien Bodard <gambas.fr () gmail ! com>
Date:       2009-03-26 16:46:23
Message-ID: 6324a42a0903260946l5dc0cce9ib68f49d883697fbd () mail ! gmail ! com
[Download RAW message or body]

in fact jesus , you don't feel the grid,
the grid just call the visible cells content via the event.

dim myarray[16000,16000]

public sub _New()

  gridview1.Rows.Count = 16000
  gridView1.Columns.Count = 16000

end


public sub gridview1_data(row as integer, column as integer)

  gridview1.data.text = myarray[row, column]

end


so you don't make any change in the data in the gridview but in the
array it self...

it's a data/view model.  a variable that store the datas and a widget
that just walk on the content.

2009/3/26 Jesus Guardon <jguardon@telefonica.net>:
> Hi all
>
> I'm trying to implement the Data event handler, but I cannot understand
> the way it must be done. I am locked out, sorry for my awkwardness.
> Can anyone provide a basic working example? I need to fill a gridview
> with 16000+ rows.
>
> Thanks in advance!
>
> Jesús
>
> Benoit Minisini escribió:
>
>>
>> You must do exactly what is written in the documentation: instead of setting
>> the data explicitely, you must implement the Data event handler. In this
>> event handler, you will receive the Row and Column of the cell to fill, and
>> in return you set the properties of the GridView.Data property to define the
>> cell contents.
>>
>> PUBLIC SUB MyGridView_Data(Row AS Integer, Column AS Integer)
>>
>>   MyGridView.Data.Text = Row & " : " & Column
>>
>> END
>>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

------------------------------------------------------------------------------
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic