Drop Down Data Window - How to refresh the data??

Hi experts!

how do you refresh the data inside the datawindow drop down list??

i have a window with one datawindow (dw_1) in it.... this data window works like a drop dow list

whenever i run this script..

long new_id

new_id = dw_1.getitemnumber( 1, 1)

delete from tablename where id = :new_id;


the record i selected for deletion.. is still in the list.. but once you close and open the window.. and check the list again.. it will not be there anymore..

i dont want to user to close and open the window just to refresh the list.. can anyone help me pls..


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


say you have datawindow dw_1 and column emp_id is dddw.

Datawindowchild child1


you can write this script after dw_1.Retrieve() in your script


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
arnel1257Author Commented:
in my window .. i have one datawindow which is dw_1 which has a data object of d_emp_id  which has a column of emp_id... and inside this d_emp_id.. i have another data object d_dd_emp_list which has two column.. emp_name which is the display column and emp_id which is the data column..


so whatever the code i have writen will work for you as your column emp_id in dataobject d_emp_id has edit style of dropdowndatawindow.

in above code


dw_1 : datawindow control object name ( you have the same )
emp_id : column name in dataobject attached to dw_1 having edit style dropdowndatawindow ( in your case emp_id is the column name in dataobject d_emp_id attached to dw_1 having edit style dddw and dataobject is d_dd_emp_list)
child1 : is variable of type Datawindowchild to get reference of dddw attached to column 'emp_id'

For more detail see help of GetChild function.

arnel1257Author Commented:
thanks sandeep.. it works!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.