2 Replies Latest reply on May 31, 2011 11:54 PM by hachiko_aud

    Column stretch event in spark datagrid

    hachiko_aud

      Hi everybody,

       

      These days I'm converting our Flex application from Flex 3 SDK to Flex 4.5 SDK (Hero).

      I've a problem with the spark datagrid, and more specifically, the events listening on the columns.

      How can we know that the columns in the spark datagrid are stretched or shrinked?

      In Flex 3, there was a DataGridEvent.COLUMN_STRETCH event on the datagrid and I can't find the equivalent in Flex 4.5.

       

      If you have any tips.... thanks!!!!

        • 1. Re: Column stretch event in spark datagrid
          HansMuller Level 1

          When a GridColumn is interactively resized "widthChanged" events are dispatched because the column's width property is set.   To track the entire column separator press-drag-release gesture you can listen for GridEvent.SEPARATOR_MOUSE_DOWN,SEPARATOR_MOUSE_DRAG, etc..events on the DataGrid's columnHeaderGroup skin part.   If you wanted to change the way the interactive column resizing works you'd have to subclass DataGrid and override protected methods like separator_mouseDownHandler(event:GridEvent), separator_mouseDragHandler(event:GridEvent).

           

          - Hans

          1 person found this helpful
          • 2. Re: Column stretch event in spark datagrid
            hachiko_aud Level 1

            Thanks for the reply.

             

            Actually, I'm listening on the ResizeEvent in my own headerRenderer. I thought it was the easiest way to do it.