Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Refreshing Drop Down Datawindows

352 views
Skip to first unread message

Davie

unread,
Jul 26, 2004, 8:34:17 AM7/26/04
to
PB 9

Hi, can someone help with the following problem I am having
?

I have a DW with several data entry boxes, some of which are
tied to drop down DW lookup lists. If the value required is
not in a DDDW, the user can minimise the current window then
open up another form and add the value, which puts it into
the SQL server back-end. However, on re-activating the
original data entry DW, it knows nothing about the new item
added into the list. The user has to close the screen then
re-open it at which point the dddw lookup is re-populated.
Is there anyway I can refresh the dddw with the user closing
and re-opening ?

Thanks
Davie

Arnoud Oortwijk

unread,
Jul 26, 2004, 8:52:45 AM7/26/04
to
Take a look a the dw_control.GetChild( ) function.
You can retrieve the DatawindowChild or insert the new rows yourself what
ever you prefer.

HTH

Arnoud


<Davie> schreef in bericht news:4104fb4c.4dc...@sybase.com...

Chris Pollach

unread,
Jul 26, 2004, 8:54:13 AM7/26/04
to
Dave;

Upon return use a "GetChild ( )" then a "Retrieve ( )" method on the DDDW
to refresh it.

Regards .. Chris


<Davie> wrote in message news:4104fb4c.4dc...@sybase.com...

Dmitri

unread,
Jul 26, 2004, 8:54:54 AM7/26/04
to
<Davie> wrote:

> I have a DW with several data entry boxes, some of which are
> tied to drop down DW lookup lists. If the value required is
> not in a DDDW, the user can minimise the current window then
> open up another form and add the value, which puts it into
> the SQL server back-end. However, on re-activating the
> original data entry DW, it knows nothing about the new item
> added into the list. The user has to close the screen then
> re-open it at which point the dddw lookup is re-populated.
> Is there anyway I can refresh the dddw with the user closing
> and re-opening ?

For any PB version...

DataWindowChild dwc_child

if dw_1.GetChild('dwc_name', dwc_child) = 1 then
dwc_child.SetTransObject(SQLCA)
dwc_child.Retrieve()
end if

Dmitri.


Andrew Giulinn

unread,
Jul 26, 2004, 9:07:45 PM7/26/04
to
Hey Davie

Your situation matches ours. The other responses explain how to refresh the
DDDW but they don't cater for the fact that the first form doesn't know that
the second form was opened and a new entry added. The user does know
however, so we allow the user to perform a refresh of (only) the DDDW on the
first form (using the same techniques described in the other posts), ie
without having to close and re-open the form.

The approach that we decided on was allowing the user to double-click on the
DDDW to refresh it. We decided that saving screen real estate and reducing
clutter was important enough to use an approach that requires training,
rather than being obvious and intuitive. You might want to use another
approach, eg some sort of button next to the drop down, but the basic idea
(of providing the user with some way of telling the DDDW to refresh after
they have added the new entry elsewhere) remains.

Hope those ideas are of some use.

Cheers

--
Andrew Giulinn
Senior Analyst/Programmer
Integrated Aviation Software Pty Ltd

<Davie> wrote in message news:4104fb4c.4dc...@sybase.com...

dw-extreme

unread,
Jul 27, 2004, 10:25:18 PM7/27/04
to
One solution is to put the little list icon next to your
dddw. If the value isnt available, the user presses the
list, adds the new value in a response window, hits save,
close the window and following the open of the list window
you re select the drop down list.

You can also create an event with the pdm_dwndropdown event
id and code your select then. It will refresh the dddw
before it is displayed to the user. The only issue is that
it will trigger evey time a dddw is clicked.

David Rawheiser

unread,
Jul 27, 2004, 11:54:47 PM7/27/04
to
If you are using PFC, the datawindow cacheing service will allow you to have
a single instance of a datastore that can be shared amoungst several
datawindows.

"Andrew Giulinn" <NO.osc...@dsa.com.au> wrote in message
news:4105abe4$1@forums-2-dub...

0 new messages