[Gambas-user] DataBrowser

Mathias Ebermann math.eber at ...221...
Tue Sep 1 06:51:41 CEST 2009


Yes, I remember the old days in VB. It was very simple, when you used the result of a SQL query as DataSource.

I will install Gambas3.

Thanks.


Benoît Minisini schrieb:
>>> No, Charlie,
>>> I didn't mean the headers. I know how to rename them.
>>>
>>> What I meant is:
>>> In my DataSource table I have a field "ProducerID".
>>> That points to another table "Producers" with the key field "id" and the
>>> field "Name". Now I would like to have the Column "Producers.Name" in the
>>> list instead of "ProducerID". I mean the field values of the records, not
>>> the headers.
>> In Gambas 3, the Table property of a DataSource can be any SQL request.
>>
>> In Gambas 2, I'm afraid there is no simple solution. But try this: use your
>> own DataView control, and create an Observer on the GridView of the
>> DataView control - you get it with the DataView.GridView property. Then
>> catch the Data event with the Observer: by using the Row property, you will
>                                                          .
>                                                         /|\
>                                                          |
> Read 'Column' instead -----------------------------------'
> 
>> know if you are in the ProducerID column, and then you can replace the
>> displayed data with the name of the producer by setting the
>> GridView.Data.Text property.
>>
>> Regards,
> 
> 
> 




More information about the User mailing list