0

I've a following function as:

 public function rawFlexClickDataGridItem(datagridId:String, colIndex:String, itemText:String):String
    {
        var child:Object = appTreeParser.getElement(datagridId);
        if(child == null)
        {
            return ErrorMessages.getError(ErrorMessages.ERROR_ELEMENT_NOT_FOUND, [datagridId]);
        }

        // Assumes the DataGrid has only one ListBaseContentHolder
        var dgContentList:Object = Tools.getChildrenOfTypeFromContainer(child, 
            ReferenceData.LISTBASECONTENTHOLDER_DESCRIPTION)[0];

        for each (var array:Array in dgContentList.listItems)
        {
            var item:Object = array[int(colIndex)]; 
            if(item.hasOwnProperty("numChildren"))
            {
                for(var i:int = 0;i < item.numChildren;i++)
                { 
                    if((item.getChildAt(i).hasOwnProperty("text") && (item.getChildAt(i).text == itemText)) || 
                        (item.getChildAt(i).hasOwnProperty("label") && (item.getChildAt(i).label == itemText)))
                    {
                        return String(item.getChildAt(i).dispatchEvent(new MouseEvent(MouseEvent.CLICK)));
                    }
                }
            }
            if((item.hasOwnProperty("text") && (item.text == itemText)) || 
                (item.hasOwnProperty("label") && (item.label == itemText)))
            {
                return String(item.getChildAt(i).dispatchEvent(new MouseEvent(MouseEvent.CLICK)));
            }
        }
        return ErrorMessages.getError(ErrorMessages.ERROR_TEXT_NOT_FOUND, [itemText,colIndex]);
    }
}

}

when I'm calling it from the javascript with providing (dataGrid,1,yellow) as arguments, I'm getting error #1069

My datGrid is as below:

enter image description here

Kushal Bhalaik
  • 3,349
  • 5
  • 23
  • 46
  • What is the full error though? It should say exactly what **property** is not found & which line caused it ... From a quick glance, is it that `return String...etc` line? Even if not that, tell us what does an expected "returned string" look like from that code? – VC.One Feb 19 '17 at 17:08
  • i'm calling it from another method public function doFlexClickDataGridItem(id:String, value:String):String { var args:Array = value.split(","); var colIndex:String = args[0]; var itemText:String = args[1]; var result:String= "DAADSA"; try{ result = rawFlexClickDataGridItem(id, colIndex, itemText); return result; } catch (error:Error) { result = error.message; return result; } return result; } – Kushal Bhalaik Feb 19 '17 at 19:22
  • **What is the full error though?**. Error `#1069` means _"Property XYZ is not found or does not exist"_... so in that bunch of code you posted, which line caused the error? What does **your specific full message** say about the name of property called _XYZ_? Tell me where to look & I'll tell you why that doesn't work. – VC.One Feb 20 '17 at 11:22
  • Example of **full error**, see the yellow box text in [**this Question**](http://stackoverflow.com/q/40954971/2057709). Something like that helps us to help you. – VC.One Feb 20 '17 at 11:33

0 Answers0