[Gambas-user] Slow Gridview creation
Fabien Bodard
gambas.fr at ...626...
Thu Mar 26 17:46:23 CET 2009
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 at ...2035...>:
> 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 at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
More information about the User
mailing list