Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Edit Operation

Avatar

Level 1
Hi All,



I am new to flex. i need to perform Edit operation.

After completing the add operation means storing values in to
database and populating values in datagrid also.After that if i am
selecting one record in the datagrid and clicking on Edit the
selected record state and country values are not populating in to
their comboboxes, it s displaying default values.

My requirement is to populate the values(selected record
values ) in the comboboxes like country,state etc.

For that i wrote below code , but i am getting scripting
error(code for state )



private function showStateCombo():void{

if(dataGridDep.selectedIndex >= 0){

if(model.globalvalues.statesArrayCB != null){

for(var i:int=0;
i<model.globalvalues.statesArrayCB.length;i++)

{

if(dataGridDep.selectedItem.STATE==
model.globalvalues.statesArrayCB.getItemAt(i).STATE)

{

mx.controls.Alert.show("if statement executed!!");

s=i;

break;

}

}

}

}





dataGridDep-->id of datagrid

model.globalvalues.statesArrayCB --> collection of all
states

STATE--> element in the xml structure



xml structure

-------------------



<STATES>

<STATE>Tamil</STATE>

.

.

.

.

.</STATES>





can any one help for resolving this issue.



0 Replies