Advertisement

03.04.2008 at 06:19AM PST, ID: 23212599
[x]
Attachment Details

Setting cursor on a dropdown datawindow to point to latest entry

Asked by badtz7229 in PowerBuilder Programming Language

Tags: Powerbuilder

I created a datawindow with 2 child datawindow (drop down datawindows).
The child datawindows are drop downs which a user can select from a list.
One of the options on the list of both drop down dw are <Add New>.
In my itemchanged() i have the following :
However when user selects <add new> and enters/saves the new entry from w_div_detail then goes back to main dw -
that drop down datawindow gets reset & does not scroll/setfocus to the newly created item on the list for display.
Even when i click another button it resets to <add new> which is at position 0 and doesn't scroll to latest addition.
i tried setfocus, find, scrolltorow. etc. nothing works.
Please help me move the position on the drop down datawindow to point to new entry the user just created. Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
CHOOSE CASE GetColumnName()
		
CASE	"divid"
 
if idwc_divid.getitemstring( idwc_divid.getrow() , "divdesc") = '<Add New>' then
 
	openwithparm( w_div_detail, 'D')
	if gl_divid <> 0 then
		idwc_divid.retrieve()
		this.setitem( row, "divid", gl_divid)
	end if
end if	
 
ll_divid = long(data) 
ll_subid = dw_div_master.getitemnumber( row, 'subid') 
 
if (data ='' or isnull(data) ) then 
	messagebox( '', 'Div is not populated.', stopsign!)
	return 1
end if
 
END CHOOSE
[+][-]03.04.2008 at 07:22AM PST, ID: 21041776

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.04.2008 at 08:24AM PST, ID: 21042373

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.09.2008 at 11:30AM PDT, ID: 21317695

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.09.2008 at 11:38AM PDT, ID: 21317779

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.10.2008 at 06:19AM PDT, ID: 21324402

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PowerBuilder Programming Language
Tags: Powerbuilder
Sign Up Now!
Solution Provided By: badtz7229
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628