Página 1 de 1

Advise requested on Data Entry for Parent/Child Browse objects

Publicado: Mar Nov 11, 2008 4:35 am
por g.s.rogers
I wanted to get some advice from News Group members who have already
accomplished what I am trying to learn -- the easiest way to have a Parent
and a Child browse object on a form and allow data entry in to one, or the
other, or both.
I've looked at the DataControls example 6 and it seems a little complex for
me to understand at this point. It looks like it uses a TArrayBrowse object
for the child, reading data into the array from a oDbfDataset on form
initialization, using a button click method to add a row to the array and
the TArrayBrowse:Edit() method to get user input, then using a ::SetValue()
method in the TArrayBrowse::PostEdit() method to update the TArrayBrowse row
values. I suppose the array gets written back to the proper dataset at some
point.
I thought originally I could use two TDBBrowse componets and got so far as
to get a form that correctly displays existing parent/child data in the two
objects. However, looking at the documentation for the TDBBrowse component,
it seems that the component is linked to one (and one only) dataset field,
requiring a calculated field composed of other field values in order to add
or edit multiple field values. Again, this seems a bit complex for me at
this point in terms of writing the methods to add new data (or edit data)
using TDBBrowse objects.
So, I guess I am wondering if the easiest way would be to use two related
datasets with two TDbfBrowse components. I don't want the user to enter data
directly into the child browse object, but rather pop a form for the data
that would complete one row of the child object.
Any advice as to the easiest way to proceed?
TIA,
Gary S. Rogers

Advise requested on Data Entry for Parent/Child Browse objects

Publicado: Mar Nov 11, 2008 9:45 am
por ignacio
Gary,
Remember that the sampel Data6 is done for learning purposes. Of couse you
can use two TDBBrowses.
> it seems that the component is linked to one (and one only) dataset field,
> requiring a calculated field composed of other field values in order to
> add or edit multiple field values.
No calculated field is necesary for editing.
> So, I guess I am wondering if the easiest way would be to use two related
> datasets with two TDbfBrowse components.
No problem at all, you should only change (refresh) the child datasource
every time the row position is change on the main DbBrowse.
> directly into the child browse object, but rather pop a form for the data
> that would complete one row of the child object.
Even easier than editing in line. Sorry but I do not see where is the
problem.
Regards,
--
Ignacio Ortiz de Zúñiga
[Soporte Xailer]
[Xailer support]
"Gary S. Rogers" <g.s.rogers@att.net> escribió en el mensaje
news:4918fdac$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
>I wanted to get some advice from News Group members who have already
>accomplished what I am trying to learn -- the easiest way to have a Parent
>and a Child browse object on a form and allow data entry in to one, or the
>other, or both.
>
> I've looked at the DataControls example 6 and it seems a little complex
> for me to understand at this point. It looks like it uses a TArrayBrowse
> object for the child, reading data into the array from a oDbfDataset on
> form initialization, using a button click method to add a row to the array
> and the TArrayBrowse:Edit() method to get user input, then using a
> ::SetValue() method in the TArrayBrowse::PostEdit() method to update the
> TArrayBrowse row values. I suppose the array gets written back to the
> proper dataset at some point.
>
> I thought originally I could use two TDBBrowse componets and got so far as
> to get a form that correctly displays existing parent/child data in the
> two objects. However, looking at the documentation for the TDBBrowse
> component, it seems that the component is linked to one (and one only)
> dataset field, requiring a calculated field composed of other field values
> in order to add or edit multiple field values. Again, this seems a bit
> complex for me at this point in terms of writing the methods to add new
> data (or edit data) using TDBBrowse objects.
>
> So, I guess I am wondering if the easiest way would be to use two related
> datasets with two TDbfBrowse components. I don't want the user to enter
> data directly into the child browse object, but rather pop a form for the
> data that would complete one row of the child object.
>
> Any advice as to the easiest way to proceed?
>
> TIA,
> Gary S. Rogers
>
>

Advise requested on Data Entry for Parent/Child Browse objects

Publicado: Mar Nov 11, 2008 9:45 am
por NoName
Gary,
Remember that the sampel Data6 is done for learning purposes. Of couse you
can use two TDBBrowses.
> it seems that the component is linked to one (and one only) dataset field,
> requiring a calculated field composed of other field values in order to
> add or edit multiple field values.
No calculated field is necesary for editing.
> So, I guess I am wondering if the easiest way would be to use two related
> datasets with two TDbfBrowse components.
No problem at all, you should only change (refresh) the child datasource
every time the row position is change on the main DbBrowse.
> directly into the child browse object, but rather pop a form for the data
> that would complete one row of the child object.
Even easier than editing in line. Sorry but I do not see where is the
problem.
Regards,
--
Ignacio Ortiz de Zúñiga
[Soporte Xailer]
[Xailer support]
"Gary S. Rogers" <g.s.rogers@att.net> escribió en el mensaje
news:4918fdac$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
>I wanted to get some advice from News Group members who have already
>accomplished what I am trying to learn -- the easiest way to have a Parent
>and a Child browse object on a form and allow data entry in to one, or the
>other, or both.
>
> I've looked at the DataControls example 6 and it seems a little complex
> for me to understand at this point. It looks like it uses a TArrayBrowse
> object for the child, reading data into the array from a oDbfDataset on
> form initialization, using a button click method to add a row to the array
> and the TArrayBrowse:Edit() method to get user input, then using a
> ::SetValue() method in the TArrayBrowse::PostEdit() method to update the
> TArrayBrowse row values. I suppose the array gets written back to the
> proper dataset at some point.
>
> I thought originally I could use two TDBBrowse componets and got so far as
> to get a form that correctly displays existing parent/child data in the
> two objects. However, looking at the documentation for the TDBBrowse
> component, it seems that the component is linked to one (and one only)
> dataset field, requiring a calculated field composed of other field values
> in order to add or edit multiple field values. Again, this seems a bit
> complex for me at this point in terms of writing the methods to add new
> data (or edit data) using TDBBrowse objects.
>
> So, I guess I am wondering if the easiest way would be to use two related
> datasets with two TDbfBrowse components. I don't want the user to enter
> data directly into the child browse object, but rather pop a form for the
> data that would complete one row of the child object.
>
> Any advice as to the easiest way to proceed?
>
> TIA,
> Gary S. Rogers
>
>