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;

dw_1.reset()
dw_1.retrieve()

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..

arnel










arnel1257Asked:
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.

sandeep_patelCommented:
Hi,

say you have datawindow dw_1 and column emp_id is dddw.

Datawindowchild child1

dw_1.GetChild('emp_id',child1)
child1.SetTransObject(SQLCA)
child1.Retrieve()

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

Regards,
Sandeep
0

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..

0
sandeep_patelCommented:
Hi,

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.Getchild('emp_id',child1)

where,
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.

Regards,
Sandeep
0
arnel1257Author Commented:
thanks sandeep.. it works!!
0
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.