cancel
Showing results for 
Search instead for 
Did you mean: 

How To Refresh DropDownByKey

Former Member
0 Kudos

Hi all,

I have a table and a dropDownByIndex contols in my view.

Both controls are mapped to a table with table control display 3 fileds while DropDownByIndex display all values in a one particular column (popultred programatically).

What i want is to refresh the column immediately that particulat field is updated in the table control.

so where to write the code.

in wdmodifyView ? it's static method, so i ain't able to call any method inside it.

Thanks,

Rgds,

Vilish

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Vilish,

Can you be more clear with the structure of the 'MyQuery' node <b>(DropDownBYIndex is Bound To a node "MyQuery,MyQueryInput.Status")</b>?

As far as I understand you are showing the status of all the activities in your dropdown. I assume that the status shown in the dropdown needn't be unique(can you have multiple entries with the same value in the dropdown?). If that is the case, as of now you cannot uniquely access the status of a particular activity. The alternatives are :

1) Add a new attribute to the node MyQueryInput and store the index of the corresponding ActivityElement in it. So each entry in the dropdown can be uniquely mapped to an element in the table. When you change the table element, you can browse to the corresponding entry in the 'MyQuery' and change the status.

2) Another alternative is to use dropDownByKey. Assign the key as the index of the ActivityElement & proceed as in the previous case.

And about where to write the code for "refreshing the column immediately when a particular field is updated in the table" : if you are updating the table through a button, write the code in the action handler of the button. If you rely on the default LeadSelection updation, use an integer variable to store the index of the previous Lead Selection. Define a method for the onLeadSelect event. Inside this method, use the variable to retrieve the previous lead selection and update the corresponding dropdown entry. Also change the integer variable's value to point to the current index of the Activity node.

Hope this helps,

Best Regards,

Nibu.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Vilish,

Please clarify if you are using <b>DropDownByKey</b> or <b>DropDowbByIndex</b>, bcos your title says <b>How To Refresh DropDownByKey</b> but in your query you say you are using DropDowbByIndex.

If I got you right, You are using a DropDowbByIndex element and have bound the "texts" attrubute to some attribute in a node. You use a table to display the node data, in which the attribute(used in dropdown) is being displayed as an input field. When you change the attribute's value through the input field, the context will be updated and will be automatically reflected in the drop down too. So, if this is the scenario, you needn't write any extra code for updating the dropdown. Can you please be more specific abt what you need?

Best Regards,

Nibu.

Former Member
0 Kudos

hi Nibu,

Yaah u are right,it's DropDownByIndex. But Scenario is different.

Table is bound to a node say "Activity" having attributes ID, Description and Status.

DropDownBYIndex is Bound To a node "MyQuery,MyQueryInput.Status"

Table is populated from DB with no node. But i have to populate DropDownByIndex this way

I get a colloection of all activitis.

For each activity, i create a MyQueryInput Object and setStatus to that of the given Activity Object.

Then i bind the collection of all these MyQueryInput Objects to the nodeMyQueryInput.It's fine

But when i update status For some Activity in table control, i wanna to update the same thing in DropDownBy Index Also.

But where and what to write

Any Help

RGds,

Vilish