(I think this came up less than a week ago)
Easiest thing is to unbind the fields completely.
Then in SomeRepeated_onBeforeRowDisplayEvent, figure out which DO you want
to use, and get the value out of its results set (whether you get the
results set via getLastResults() or using the DO's convenience methods),
using the rowindex as the row argument (available by calling getRowIndex()
on the event argument that is passed to onBeforeRowDisplay).
Set the value from the DO into the field using either setValue on a
reference to the field, or setDisplayFieldValue on the repeated (you can
get a reference to the repeated by calling getSource() on the event
argument that is passed to onBeforeRowDisplayEvent, and casting it to
CSpRepeated).
-- Curt Springer, Team NetDynamics
At 03:19 PM 5/7/99 -0800, [EMAIL PROTECTED] wrote:
>Hi Folks,
>
>I have a page with Repeateds and Text Boxes whose fields are statically
bound to a
> DO. Is there a way to dynamically change or set the binding of these
display fields
> to a different data object's data fields at run time.
>
>I have looked into the setBoundDataObjects and setBoundDataField methods.
I have tried
> to set the BoundDO in the page's OnBeforeDOExec event and set the display
fields
> in the objects OnBeforeDisplay events for text fields and
OnBeforeDOExecute event
> for repeateds but so far haven't got my code to work.
>
>Any suggestions/sample code/help from all you experts in this area will be
greatly appreciated.
>
>Thanks,
>Nilima Desai
>Hewlett Packard Co.
>408-970-2236
>_________________________________________________________________________
>
>For help in using, subscribing, and unsubscribing to the discussion
>forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
>
>For dire need help, email: [EMAIL PROTECTED]
>
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]