2 Replies Latest reply on Sep 18, 2009 11:45 AM by cooljsh

    advanced datagrid with grouped columns and grouped rows

    cooljsh

      hello every body, plz need your experience help. 'cause Im so new using FLEX

      I have an XML (like an XML data type) something like this

       

      <Table>
        <Rows>
          <cAgencia>F0002</cAgencia>
          <cAgNombre>SanBorja</cAgNombre>
          <cTVentanilla>V0002</cTVentanilla>
          <dTVNombre>Plataforma</dTVNombre>
          <TcksEnEspera>20</TcksEnEspera>
          <VentsEnAtencion>50</VentsEnAtencion>
        </Rows>

        <Rows>
           <cAgencia>F0003</cAgencia>
           <cAgNombre>Miraflores</cAgNombre>
           <cTVentanilla>V0002</cTVentanilla>
           <dTVNombre>Plataforma</dTVNombre>
           <TcksEnEspera>30</TcksEnEspera>
           <VentsEnAtencion>40</VentsEnAtencion>
         </Rows>

        <Rows>
           <cAgencia>F0002</cAgencia>
           <cAgNombre>SanBorja</cAgNombre>
           <cTVentanilla>V0003</cTVentanilla>
           <dTVNombre>Caja</dTVNombre>
           <TcksEnEspera>55</TcksEnEspera>
           <VentsEnAtencion>25</VentsEnAtencion>
         </Rows>

         ...... (continue)
      </Table>

       

       

      so, I need to make a table (I guess with advancedDataGrid) something like this

       

      flex.JPG

      as you can see,   I have to group them by columns and Rows.  I have found a "mx:groupedColumns" that maybe could help me , but I couldn't find something like "mx:groupedRows".

      The grid may be dynamic,   for example if I have another XML node like:

       

      ....

        <Rows>
           <cAgencia>F0004</cAgencia>
           <cAgNombre>SanMiguel</cAgNombre>
           <cTVentanilla>V0002</cTVentanilla>
           <dTVNombre>Plataforma</dTVNombre>
           <TcksEnEspera>15</TcksEnEspera>
           <VentsEnAtencion>52</VentsEnAtencion>
         </Rows>

      ......

       

      the grid may add a ROW and in the column of plataforma add the data: 15 and 52, so the grid may be something like this:

      flex2.JPG

       

      as you can see, the grid may add rows and columns in depends of the count of XML data.

       

      plz help.

       

       

      thanks, regards  from Lima, Peru.

       

      JS