Note that there are some explanatory texts on larger screens.

plurals
  1. POSelection shifts while scrolling in data grid
    primarykey
    data
    text
    <p>I'm newbie to flex and this forum as well. I've a datagrid which displayed images in mx:VBox in itemrenderer, now I need to allow user to multi select the VBox . but when I select some item(s), change the background color of VBox and scroll the grid it automatically select some rendom item(s) and set the same background color. I know flex reuse item renderer, which I read it <a href="http://www.adobe.com/devnet/flex/articles/itemrenderers_pt1.html" rel="nofollow">here</a> </p> <p>but how can I prevent my selection only item(s). below is my code</p> <pre><code>&lt;mx:DataGrid id="dgPhoto" variableRowHeight="true" dataProvider="{StyleItemsArray}" verticalGridLineColor="white" verticalGridLines="true" showHeaders="false" width="100%" height="100%" allowMultipleSelection="true" &gt; &lt;mx:columns&gt; &lt;mx:DataGridColumn width="250" headerText="Preview" dataField="img"&gt; &lt;mx:itemRenderer&gt; &lt;mx:Component&gt; &lt;mx:VBox height="215" horizontalAlign="center" click="this.setStyle('backgroundColor', 'white')"&gt; &lt;mx:Script&gt; &lt;![CDATA[ ]]&gt; &lt;/mx:Script&gt; &lt;mx:HBox horizontalAlign="center" horizontalGap="0"&gt; &lt;mx:Image brokenImageBorderSkin="{null}" brokenImageSkin="@Embed(source='../img/errorIcon231.png')" id="image1" width="180" source="{data.source}" horizontalAlign="right"&gt;&lt;/mx:Image&gt; &lt;mx:VBox horizontalAlign="center" verticalGap="2"&gt; &lt;mx:Button click="{btnZoom_clickHandler(event, data.sourceHRES, data.label, data.IDMSFile)}" toolTip="Zoom" id="btnZoom" icon="@Embed(source='../img/zoom.png')" fillColors="#BB3030"/&gt; &lt;mx:Button click="{btnDownload_clickHandler(event, data.IDMSFile)}" toolTip="Place this style" id="btnDownload" icon="@Embed(source='../img/Download.png')" fillColors="#BB3030"/&gt; &lt;/mx:VBox&gt; &lt;/mx:HBox&gt; &lt;/mx:VBox&gt; &lt;/mx:Component&gt; &lt;/mx:itemRenderer&gt; &lt;/mx:DataGridColumn&gt; &lt;/mx:columns&gt; &lt;/mx:DataGrid&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload