No ideas on how to do this at all?

On Tue, Jun 9, 2009 at 4:13 PM, Pan Troglodytes <[email protected]>wrote:

> I've got a bit of a problem and haven't been able to figure it out.  When
> using hierarchical views with ADG, I find that the icon can't be clicked on
> to select the row.  I can't figure out how to capture a click on the icon at
> all.
>
> <?xml version="1.0" encoding="utf-8"?>
> <Application
>   xmlns="http://www.adobe.com/2006/mxml";
>   >
>   <Script>
>     <![CDATA[
>       // put any icon you want in the embed below, doesn't matter
>       [Bindable] [Embed(source="imageA.png")] private var imgClass:Class;
>
>       private function geticon(item:Object):Class
>       {
>         return imgClass;
>       }
>     ]]>
>   </Script>
>   <AdvancedDataGrid iconFunction="geticon" itemClick="trace('itemclick')"
> click="trace('gridclick')">
>     <dataProvider>
>       <HierarchicalData childrenField="subitems" source="{[{label:'test'},
> {label:'test2'}]}"/>
>     </dataProvider>
>     <columns>
>       <AdvancedDataGridColumn dataField="label"/>
>      </columns>
>   </AdvancedDataGrid>
> </Application>
>
> If you click anywhere but the icon, the gridclick and itemclick events both
> fire.  But if you click on the icon, you get only the gridclick.  And the
> gridclick event doesn't get anything useful for target/currentTarget, as far
> as I can tell.
>
> The main thing I really want to do is have clicking on the icon select the
> row, just like clicking anywhere else will do.  Tangentially, it would be
> nice to know how to capture the event in case I wanted to do something
> different with clicking on the icon.
>
> --
> Jason
>



-- 
Jason

Reply via email to