3 Replies Latest reply on Apr 25, 2014 7:23 AM by AHMED CHANNEL

    SelectedIndex

    dc0der1
      I had a datagrid that was being populated by an array. When I would use datagridname.SelectedIndex = 0, it would select the #2 index. I set up a label and a button to test things more. The label displayed what index was selected and the button would attempt to set the selectedindex to 0. If I selected the 1st item manually, the label would display 0. However, if I used the button or actionscript to set the selectedindex to 0, it would jump to item #2 (the last in the datagrid/array) and the label would display 2. Very very strange. I tried using validatenow, validatedisplaylist, etc. Nothing helped.

      I finally got it working but changing the dataprovider to an object instead of an array (using addItem instead of push). This solved the issue.

      Any idea why this could of been happening? I am posting this just in case someone else has the same issue and is looking for an answer like I was.