Hello Flexcoders,

 

If I could only give you a simple snippet which could reproduce this Mandelbug, it certainly would make my life easier.  But alas, I can only give you a textual explanation with the hope that someone can help shed some light on this.

 

Basically I have a datagrid in which I would like to have the first item selected after the data loads.  I achieve this by databinding a function on the selectedIndex property like this:

 

<mx:DataGrid

selectedIndex=" { helper.getSelectedIndexInDatagrid( mFilterProvider.filteredData ) }"

 

/>

 

‘filteredData’ is a property of my filtering data provider.  I databind to that so that the function gets called as the data comes in from the server side, or when client – side filtering happens.

 

getSelectedIndexInDatagrid is a rather straightforward function.  It returns 0, and also sets a selectedItem property in the main view so that a details panel can render the data of the 0th item.

 

It looks something like this:

 

/**

       * Return back an item to the datagrid during databinding.

       *

       */

      public function getSelectedIndexInDatagrid(filteredData):Number

      {

           

            view.selectedItem  = filteredData.dataProvider.getItemAt( 0 );

            return 0;

                 

      }

 

 

This works, mostly…

 

The data loads, the first item is selected and the selecteItem property of the view gets populated.  If I try to select another row in the datagrid, the 0th selected row stays selected.  Two rows highlighted at the same time.  Note: the mutlipleSelect property is not set to true.  I move my mouse over the 0th row and the selection disappears and all acts like normal.

 

I need to solve this bug, and have tried numerous workarounds to no avail.  Any suggestions will be warmly received.

 

Best,

al

 

 

 

 

 



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




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS





--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.11.13/126 - Release Date: 09/10/2005

Reply via email to