[Gambas-user] Feeding a DataView using data from another DataView

Benoît Minisini gambas at ...1...
Tue Nov 12 14:39:59 CET 2013


Le 12/11/2013 10:49, Jose Monteiro a écrit :
> Please guys, some help here. I'm at the middle of a program for
> controlling a process for a chemical company.
>
> 1 - There is a DataSource linked to a table and containing a
> Dataview. The DataView will show hundreds of rows.
>
> 2 - There is another DataSource, which will use a sql statement,
> containing another DataView. This one will show a few rows, based on
> the sql statement.
>
> The situation: When the user clicks on a certain row of the first
> DataView, I need to grab the value of the field "Contract_Number" so
> I can create the sql statement for the second DataSource.
>
> The question: How can I grab the field value? There is no click event
> and the mouse down event, even with track enabled on DataView
> control, does not work.
>
> Regards Jose Monteiro

The DataView emits an 'Activate' event each time its current record changes.

The DataSource emits a 'Change' event when its current record changes too.

The DataSource has methods and properties to get the contents of the 
current record.

Look at the wiki documentation.

Regards,

-- 
Benoît Minisini




More information about the User mailing list