[Gambas-user] Slow Gridview creation
Jesus Guardon
jguardon at ...2035...
Fri Mar 27 00:17:07 CET 2009
Thanks for reply, but still not clear...
Your example only draws a grid with empty cells. I can't figure out how
to fill the grid with a database result object, even with a simple
array. Please, open my eyes!! :-((
Jesus
Fabien Bodard escribió:
> 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
>>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> 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