Skip to Content
0

Changing DropDown Fileds in Datawindow Dynamically and set for Text Data?

May 09, 2017 at 07:11 PM

110

avatar image
Former Member

I have one Data Window Containing Four Fields like User Name(Text), Question Type(Drop Down), Question(Text), Answer(Text) Fields followed by Two Buttons.I need to Write logic for Changing Drop Down for Question Type Fields by Default Question will be Populated from Question Text Box.Data Coming from DB, I haveCreated Tables for that. But How to Write this Logic am Trying But Failed to Resolve, Can You give me Guidance on this. Thank You So much in Advance

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

avatar image
Former Member May 09, 2017 at 09:22 PM
0

I did not understand exactly what you are trying to do. But if you are trying to change values in your dddw based on another column, you can retrieve the dropdown datawindow in the itemchanged event of your main datawindow.

Hope this helps.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member May 09, 2017 at 10:35 PM
0

Hi Venkat,

Assuming I have understood your requirement correctly ... I would create a dataobject for the Question Type drop down, which retrieves Question Type records using a Question value as a retrieval argument. i.e. it retrieves Question Type records for a given Question.

Then in the ItemChanged event, when the Question column value is changed, re-retrieve the Question Type DDDW (possibly also when window opens etc)

Rough sample code -

Itemchanged :

DataWindowChild ldwc_question_type

IF dwo.name = 'question' THEN

GetChild('question_type', ldwc_question_type)

ldwc_question_type.SetTransObject(SQLCA)

ldwc_question_type.Retrieve(data)

END IF

Share
10 |10000 characters needed characters left characters exceeded