3 Replies Latest reply on Mar 16, 2012 9:23 AM by jfb00

    Editable Datagrid

    jfb00 Level 3

      Hi All,

      I have a editable datagrid using vertical scroll, every time i finish editing a top row the cursor jumps down and the scroll bar moves down also.

      This only happens when i use itemEditEnd event.

      Any ideas?

      Thanks

       

      (Using SDK 4.5.1)

        • 1. Re: Editable Datagrid
          jfb00 Level 3

          I see this behavior using itemEditEnd but only when I do refresh the arraycollection data of the grid. I am using:

           

          protected function laborRates_itemEditEndHandler(event:DataGridEvent):void

                      {

                       if (event.reason == DataGridEventReason.CANCELLED)

                          {

                              // Do not update cell.

                              return;

                          }

                         

                          if (isNaN(event.currentTarget.itemEditorInstance.text) || event.currentTarget.itemEditorInstance.text == "" || Number(event.currentTarget.itemEditorInstance.text) < 0 ){

                              event.currentTarget.itemEditorInstance.text = 0;

                          }

                          event.currentTarget.dataProvider.refresh();  //Here is the issue

                      }

           

          Any ideas how can I control this scroll?

          Thanks

          • 2. Re: Editable Datagrid
            Flex harUI Adobe Employee

            You shouldn’t need to call refresh().  What goes wrong when you don’t?

            • 3. Re: Editable Datagrid
              jfb00 Level 3

              Thanks for you reply and help Alex,

              Yes, i just figured this out