4 Replies Latest reply on Dec 18, 2008 1:02 PM by Guddie

    RadioButton in 1st row of DataGrid causing problems

    Guddie
      I have a DataGrid with RadioButtons in one column using itemRenderer. The DataGrid resides on a TitleWindow which is created and popped-up everytime the user clicks a button. The dataProvider for the DataGrid is an ArrayCollection, and the RadioButtons are selected or not based on a boolean value in each ArrayCollection item when the window and DataGrid is displayed. If the user clicks a different RadioButton in the DataGrid, then the ArrayCollection items are updated with the new boolean values.

      The problem is with the RadioButton in the first row keeping its selected value. With the RadioButtons in the all other rows, when the TitleWindow and DataGrid are displayed, the correct RadioButton is selected based on the boolean value from the item in the ArrayCollection. But if the first row's RadioButton is the one that needs to be selected, it isn't. I set up a listener for the valueCommit event on the RadioButtons, and the results are interesting: valueCommit for the RadioButtons in all rows besides the first is fired just once, with the selected value being true. But if the RadioButton in the first row is the one that should be selected, valueCommit is fired 5 times, the first 3 times reporting the selected value as true and last 2 times reporting it as false.

      Any help on this would be greatly appreciated. A similar bug has been reported but it doesn't provide any workaround.