[Gambas-user] Disconnected Result in TAbleView

Daniel daniel at ...889...
Fri Jun 10 10:43:38 CEST 2005


Benoit Minisini wrote:

>On Thursday 09 June 2005 04:30, BUDI ARIEF GUSANDI wrote:
>  
>
>>Benoit Minisini wrote:
>>    
>>
>>>On Tuesday 07 June 2005 13:31, BUDI ARIEF GUSANDI wrote:
>>>      
>>>
>>>>Dear All,
>>>>
>>>>is it that Tableview is only bound to result object ? will it might be
>>>>possible if we know the structure of result object so we can add or
>>>>create data on the fly and we can add/delete data from tableview without
>>>>affecting database, something like disconnected recordset in ADO ?
>>>>i use gridview to manipulate data within grid, but the lack are it has
>>>>no header and row higlighting so it's hard to use keyboard to select
>>>>row. Any work around ? unbound editable grid is one of vital components
>>>>in making database app.
>>>>
>>>>Regards,
>>>>Budi
>>>>        
>>>>
>>>TableView is bound to nothing. It just displays what is returned in its
>>>Data event.
>>>      
>>>
>>Interesting, how can i add some data inside then without using result
>>object. Possible ? please help.
>>
>>    
>>
>
>Look carefully at the code of the database example, where TableView displays 
>the result of a query. (FRequest:83)
>
>The TableView control raises a 'Data' event each time it needs to get the data 
>from a specific column and row. You just have to fill the Data property of 
>the TableView control with the needed information (at least the Text 
>property). This information don't necessarily come from a Result object. You 
>can put what you want!
>
>Regards,
>
>
>
>  
>
sample

' Gambas class file

PUBLIC SUB TableView1_Data(Row AS Integer, Column AS Integer)

TableView1.Data.Text = "0"

END

PUBLIC SUB Form_Open()

TableView1.Columns.Count = 0
 TableView1.Rows.Count = 0
 TableView1.Columns.Count = 4

 TableView1.Columns[0].Text = "aaaaaa"
 TableView1.Columns[1].Text = "bbbbbbb"
 TableView1.Columns[2].Text = "cccccc"
 TableView1.Columns[3].Text = "ddddd"

 TableView1.Rows.Count = 10

 TableView1.MoveTo(0, 0)
 TableView1.SetFocus

END

daniel





More information about the User mailing list