i am doing flex4 web application with mxml tags,
i am having one text box and one datagrid and one save button. text box having one company name, data grid having employee names.
when i click save button which is placed in outside the datagrid it will save all the details in cloud DTO.
Now my requirement is text box having the same company name and when i enter same employee name in datagrid and click save button means it wont
allow to save that record, and through msg box with some alerts.
this is my code:
private function saveRecord():void
for (i = 0; i < lengthindex; i++)
if((model.employeeDetailsReqRecordsList.getItemAt(lengthindex).employ ee name==customerdet.selectedItem.employeename)&&
Alert.show("you cannot Add Same CustomerName and Invoiceno again");
(when this line come the error through like this: Index '8' specified is out of bounds.
var employeename:String = employeename.text;
model.employeeDetailsReq.employename = employeename;
var sendRecordToLocID:QuickBaseEventStoreRecord = new
<mx:Button id="btnAdd" x="33" y="419" enabled="false" label="Add" width="65" fontFamily="Georgia" fontSize="12" click="saveRecord()"/>
employeename and employeeID are datafields of datagrid. datagrid id=customerdet
employeeDetailsReqRecordsList---recordlist of save records
please help .
any suggession or snippet code welcome
sorry but you question is not very clear...are you trying to show the item clicked on the datagrid on the input box? with an alert? you should look at "listevent" if thats the case?... sorry i just dont follow.