8 Replies Latest reply on Jan 13, 2007 11:42 PM by TJ Downes

    Odd Datagrid issue after 2.0.1 upgrade

    bdensmore12673 Level 1
      I just upgraded to 2.0.1 on Friday for Windows. Since upgrading, I am having a very odd issue with a datagrid.

      I have a couple of hidden columns in my datagrid that in 2.0 worked fine. Ever since I upgraded and re-compiled in 2.0.1 those hidden columns seem to toggle their state.

      If I click on one row it displays fine, I can move to the next row and click on it and the 2 hidden columns now display.

      Has anyone else run into this?

      Thanks,
      Ben
        • 1. Re: Odd Datagrid issue after 2.0.1 upgrade
          mike_morearty Level 1
          I can't reproduce a problem like that. Here is what I tried:

          1. Compiled the following program:

          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" >
          <mx:XML id="mydata" xmlns="">
          <root>
          <obj a="click here" b="b1" c="c1" />
          <obj a="then click here" b="2" c="2" />
          <obj a="3" b="3" c="3" />
          <obj a="4" b="4" c="4" />
          <obj a="5" b="5" c="5" />
          <obj a="6" b="6" c="6" />
          </root>
          </mx:XML>
          <mx:DataGrid x="10" y="10" dataProvider="{mydata.obj}">
          <mx:columns>
          <mx:DataGridColumn headerText="Column 1" dataField="@a"/>
          <mx:DataGridColumn headerText="Column 2" dataField="@b" visible="false"/>
          <mx:DataGridColumn headerText="Column 3" dataField="@c"/>
          </mx:columns>
          </mx:DataGrid>

          </mx:Application>

          2. Ran it
          3. Clicked where it says "click here"
          4. Clicked where it says "then click here"

          As expected, the hidden row remained hidden.
          • 2. Re: Odd Datagrid issue after 2.0.1 upgrade
            bdensmore12673 Level 1
            Could it have anything to do with me using Remoting and converting my results to an ArrayCollection through AS?

            The first time the DataGrid loads the hidden columns remain hidden as expected. I have a change event on the DataGrid that reloads the dataset and as soon as I fire the change event and populate the ArrayCollection with a new set of data it now displays the 2 hidden columns.

            I was having this same behavior with another DataGrid but changing from:
            public function getPendingClaimsResult(event:ResultEvent):void
            {
            claimsPending = new ArrayCollection(event.result as Array);
            }

            To:
            <mx:ArrayCollection id="claimsPending" source="{ArrayUtil.toArray(newFormObject.getPendingClaims.lastResult.source)}" />

            Fixed the problem. The only reason I can't do it this way with this DataGrid is because I have 2 different sources filling the grid depending on where you are in the application.

            Any ideas of what else I can try?

            Thanks,
            Ben
            • 3. Re: Odd Datagrid issue after 2.0.1 upgrade
              mike_morearty Level 1
              Just a guess -- try this: instead of

              public function getPendingClaimsResult(event:ResultEvent):void
              {
              claimsPending = new ArrayCollection(event.result as Array);
              }

              do

              public function getPendingClaimsResult(event:ResultEvent):void
              {
              claimsPending.source = event.result
              }

              Let me know if that works.
              • 4. Re: Odd Datagrid issue after 2.0.1 upgrade
                bdensmore12673 Level 1
                Still having the same issue. I just don't see how the state can toggle like that.

                I've tried doing a clean build, switched my workspace so it would create a new workspace for 2.0.1 and it still seems to happen.

                I'm going to keep working on it but if anyone has some ideas of what else I can try I would really appreciate it.

                Thanks,
                Ben
                • 5. Re: Odd Datagrid issue after 2.0.1 upgrade
                  bdensmore12673 Level 1
                  I just downgraded back to 2.0 and everything is working fine. I will stay at 2.0 for the time being.

                  Someone from the Flex Coders list was having the same issue and submitted it as a bug. Hopefully it can be reproduced and fixed.

                  Thanks,
                  Ben
                  • 6. Re: Odd Datagrid issue after 2.0.1 upgrade
                    m4rkdelaney
                    I have had the same problem. The same project compiled with FB 2.0 hidden grid fields work fine. After FB 2.01 hidden grid fields start showing after dataProvider is updated from source like webservice.

                    I uninstalled and reinstalled FB 2.0 and imported the project and did a clean build and hidden grid fields stay hidden after dataProvider is updated.

                    • 7. Re: Odd Datagrid issue after 2.0.1 upgrade
                      mike_morearty Level 1
                      Thanks for reporting this. I checked into it, and it turns out that this has been fixed internally; the fix will go out in a hotfix. Sorry, I don't know the target date of that hotfix (I don't think it has been determined yet).
                      • 8. Re: Odd Datagrid issue after 2.0.1 upgrade
                        TJ Downes Level 1
                        Same issue. They dont toggle, but the vissible="false" fields are being displayed... its random too. some in the app stay invisible, some dont