The cursor find function can't take e4x expressions.  It can only do
exact match searching of what's in the ICollectionView.  So you're going
to need to setup the find a little differently, perhaps find the node
using e4x, then get its index, then seek to it.

Matt

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of mepaninaresh
Sent: Monday, April 03, 2006 8:51 AM
To: [email protected]
Subject: [flexcoders] Find Function

I can't seem to get complex xml elements working.

Example 1 works.
private function findFirstName():void
{
 createSort();
 var cursor:IViewCursor = myXMLListCollection.getCursor();
 var values:Object = {FreeText: nameInput.text};
 cursor.findFirst(values);
}

Example 2 does not work.
private function findFirstName():void
{
 createSort();
 var cursor:IViewCursor = myXMLListCollection.getCursor();
 var values:Object = {Company.(@Type=='Subject').CompanyId: 
nameInput.text};
 cursor.findFirst(values);
}
---------------------------------

<mx:DataGrid id="myCustomerCountFilterGrid1" width="800%" 
height="600%" dataProvider="{myXMLListCollection}">
 <mx:columns>
  <mx:DataGridColumn columnName="FreeText" headerText="Reference"/>
  <mx:DataGridColumn columnName="Name" headerText="Name" width="250">
   <mx:cellRenderer>
    <mx:Component>
     <mx:Link label="{dataObject.Company.(@Type=='Subject').Name}"/>
    </mx:Component>
   </mx:cellRenderer>
  </mx:DataGridColumn>
  <mx:DataGridColumn labelFunction="setRegistrationNo" 
headerText="Registration No"/>
 <mx:DataGridColumn labelFunction="setCreditLimit" 
headerText="Monthly Credit Limit"/>      
 <mx:DataGridColumn labelFunction="setInsuredLimit" 
headerText="Insured Limit" width="40"/>
 <mx:DataGridColumn labelFunction="setOutStandingBalance" 
headerText="Outstanding Balance"/>       
 </mx:columns>
</mx:DataGrid>

Thanks for any help.







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links



 




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to