In this Flex/RemoteObject/CFC app I'm developing:
http://66.219.52.136/simple/bin/simple.html 

I have two columns in my drivergrid
1) Product (which are single product name such as: TravelMate 8000)
2) RelatedProducts(comma separate string of product names such as: 
TravelMate 8000, TravelMate 8200, etc.)

When the user selects a Product in the left productgrid, I want the 
filter to search the product column in the drivercollection for an 
exact match AND the relatedproducts column if the product name exists 
in the comma separated list.

My filter works for product column just fine:

private function filterByProduct( item:Object ) : Boolean
{
     var ProductItem:Object = productgrid.selectedItem;
     if( ProductItem == null ) return false; 
     return(ProductItem.Product == item.Product);
}

How do I modify it to also search the string in RelatedProducts 
column?

I tried something like this, but I don't know Actionscript syntax 
well enough yet to get it to work: 

private function filterByProduct( item:Object ) : Boolean
{
     var ProductItem:Object = productgrid.selectedItem;
     if( ProductItem == null ) return false; 
     return(ProductItem.Product == item.Product OR
     ProductItem.Product ~= item.ProductRelatedProducts);
}


Can you help with the syntax? Any recommendations?

I'm sorry if it takes a long time to load the data in the grids, next 
I need to address how to improve the remoteobject performance for 
large tables.

Thanks!
Don


Reply via email to