Flex Advanced DataGrid with dynamic grouping

Can we implement something similiar as in below link, using flex 3.
http://demos.telerik.com/aspnet-ajax/grid/examples/groupby/grouploadmodeclient/defaultcs.a spx
I am not sure if flex 3 allows grouping of columns based on drag - drop component. Plus how to show the pictorial view of grouped columns, same as in the above example.
Any help greatly appreciated.

This blog post seems to answer your question:
http://blog.flexgeek.in/2007/06/tips-tricks-adding-a-combobox-to-a-datagrid-header-as-head errenderer/
http://omalraj.com/2009/06/flex-datagrid-header-with-a-combobox-filter/
http://franto.com/custom-header-in-datagrid-part-2/
http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.html
If this post answers your question or helps, please mark it as such. Thanks!
http://www.stardustsystems.com
Adobe Flex Development and Support Services

Similar Messages

  • Flex DataGrid with Dynamic Grouping

    Does anyone know of any examples of Flex datagrids that have
    grouping features comparable to the numerous grid components
    available in the ASP.NET world? I’m thinking of .NET
    component vendors such as Telerik, Infragistics, Component Art,
    DevExpress, etc.
    The way these .NET controls generally work is that you drag
    the header of a column to a bar above the grid, which causes the
    grid to redraw based on the new grouping you just specified.
    This is an example of a grid component that I am currently
    using:
    Telerik
    Grid
    Thank you,
    Mike Chabot

    The renderer's data property is the data for the entire row so you can get the column1 data and assign the combobox's dataprovider accordingly.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • (Advanced)DataGrid with selectable columns

    Hello -
    I'm trying to make a Flex (Advanced)DataGrid component with some mechanism where the user can toggle the visibility of the columns.  I've crudely implemented this by reading in the columns into the right-click menu, and when a column name is selected here, the visibility is toggled.  It works, but it's not the most elegant solution.
    Specifically, I'm trying to emulate the "datagrid" that Mozilla Thunderbird uses to display emails.  Here is an image:
    In the upper right, there is an icon over the scroll bar.  If there is no scrollbar, the icon remains in the same place.  When clicking the icon, it opens up a menu that shows all the possible columns, with the visible ones having a check mark next to them, like this:
    Also, the scroll bar always appears under this button, never "pushing" it over into it's own column.
    I'd like to re-create this in Flex.  I believe the menu part and creating a column with a button headerRendered is easy enough.  But I can't figure out how (if at all possible) to do this with the scrollbar, because the scrollbar always seems to be "its own column".  Any ideas or help would be appreciated.  Thank you.
      - Ian

    This blog post seems to answer your question:
    http://blog.flexgeek.in/2007/06/tips-tricks-adding-a-combobox-to-a-datagrid-header-as-head errenderer/
    http://omalraj.com/2009/06/flex-datagrid-header-with-a-combobox-filter/
    http://franto.com/custom-header-in-datagrid-part-2/
    http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.html
    If this post answers your question or helps, please mark it as such. Thanks!
    http://www.stardustsystems.com
    Adobe Flex Development and Support Services

  • Identity Service LDAP with dynamic grouping

    Hi all,
    We are developing an enterprise application with oc4j and bpel.
    First we managed to handle user management with XML based JAZN tool.
    After that,we managed to connect identity service with iPlanet LDAP server and get users and roles(with static groups defined.)
    But our client wanted static and dynamic groups together in their LDAP server,because of the complexity of their current user base.
    When we try this,we cannot get the roles that are assigned with dynamic groups.But we can get the roles that are statically defined.
    We check the roles from the worklist application (integration/worklistapp... thing..) and we se the static groups where we cannot see dynamic one's.
    There is a section in is_config.xml like:
    <roleControls>
    <property name="nameattribute" value="cn"/>
    <property name="objectclass" value="groupOfUniqueNames"/>
    <property name="membershipsearchscope" value="onelevel"/>
    <property name="memberattribute" value="uniquemember"/>
    <search searchbase="ou=Groups,dc=dummy,dc=com,dc=tr" scope="onelevel" maxSizeLimit="1000" maxTimeLimit="120"/>
    </roleControls>
    I think the property uniquemember has an effect in this situation but I cannot find any sample configurations using dynamic groups in LDAP.
    Hope somebody has already done that..

    I find a solution here:
    http://download.oracle.com/docs/cd/E15523_01/integration.1111/e10226/hwf_config.htm
    I am currently using weblogic's defaultAuthentication to test BPM 11g.
    I do not know if this approach works in production environment.

  • DataGrid with dynamic comboboxes

    I need to design a dataGrid with comboboxes in one column. These comboboxes should all have different dataProviders based on a value from column 1. What would a general approach be?
    Thanks

    The renderer's data property is the data for the entire row so you can get the column1 data and assign the combobox's dataprovider accordingly.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Spark DataGrid with Dynamic Column Width

    Lets suppose I have a Spark Datagrid with no explicit typicalItem. When the Datagrid is initialized, the column widths are calcualted correctly based on the contents of the dataprovider. However if I add/remove an item from the dataprovider, or modify the one of the objects in the dataprovider, the column widths never update to reflect the change. Is the the correct behavior for a DataGrid? If so, is there any method I can call to force the DataGrid to recalculate and redraw the column widths?

    When Spark DataGrid doesn't have a typicalItem, it uses the first dataProvider item as the typicalItem.  If you change that, the DataGrid won't pick it up immediately. You can invalidate the current typicalItem using dataGrid.invalidateTypicalItem().

  • Advanced datagrid with grouped columns and grouped rows

    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
    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:
    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

    any help ????????? I found OLAPDataGrid .....   I was thinking to send all the data into a bidimensional Array , then pass the data of my bidimensionalArray to  OLAPDataGrid ...  but I'n not sure if Flex is able to do it  .... 
    the really serious problem is the special ROW I must use ...
    regards
    JS

  • DataGrid with dynamic columns & renderers

    I'm developing using Flash Builder 4 & Flex SDK 4.1.
    I need to manage very dynamic DataGrid components and keep their definitions, which are all part of a complex item renderer of an Offers list.
    The objects structure is simplified as follows -
    Data: Model --> Offers ArrayCollection --> Offer VO --> DataGrid data ArrayCollection & DataGrid columns Array
    View: List --> Offer Item Renderer --> DataGrid
    1. Since the DataGrid's columns property accepts only an Array (not ArrayCollection), it seems like Data Binding for defining the columns is very problematic.
    I tried to bind it to the source property of an ArrayCollection that would keep my columns definitions, but it didn't really work (mainly header display bugs).
    What is the recommended way to keep the dynamic columns definition of a DataGrid?
    2. Each column can have a set of dynamic properties, so I created a "mutant" - Column VO that extends DataGridColumn and got a dynamic properties ArrayCollection on it.
    The columns got a custom header renderer that includes an icon when there are properties.
    The header renderers got 4 main states (NotSelectedWithProperties, SelectedWithProperties, NotSelectedWithoutProperties & SelectedWithoutProperties).
    However, the header renderer area seems a bit buggy when maintaning dynamic columns.
    Any thoughts on the subject?
    3. Anyway, I ended up recreating the DataGrid's columns Array very often (copying the columns definition on the offer's item renderer's dataChange event handler).
    Note that the dynamic properties can be edited when the column is selected and I copy their values from the view back to the model when entering the state NotSelectedWithProperties.
    This feels way too complicated and I really try to keep it simple, inspite of the required complexity.
    Does anyone have better ideas?
    4. In some cases the column's item renderer should also be modified into another DataGrid (grid-in-grid).
    I used the MXDataGridItemRenderer with a DataGrid and included an ArrayCollection for the "newValue" returned by the editor.
    (I use RendererIsEditor=true and on updateComplete populate that variable with the DataGrid's dataProvider contents)
    When needed, I loop though the data objects of the parent DataGrid and populate the related field with an ArrayCollection of key-value objects that are displayed on the internal DataGrid.
    After adding this feature I encounter very strange bugs -
    a. After editing the grid-in-grid values and changing the column's state (selecting & deselecting), I get the following exception:
    ArgumentError. Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/setChildIndex()
    at mx.core::UIComponent/setChildIndex().......6993....
    All I could find about this is that it might be related to some context error or something, but I'm really stuck on this one.
    b. Sometimes another column might copy value from one row to another, running over the previous value.
    I'm not sure exactly what sequence of actions causes this behavior, but it's related to that itemRenderer for sure.
    c. Switching places with a column that uses the grid item renderer (headerShift) causes a stak overflow of StyleManager that tried to get style from the DataGridItemRenderer. This one I just found out, but couldn't reproduce a second time... strange!
    I'm pretty sure this caused another problem that I don't remember at the moment.
    The bottom line is that there got to be a better way to implement this feature within this already-complicated environment.
    Maybe I'm doing something very wrong here...
    Please advice and thanks for reading all this.

    Update on item 4a -
    This was a major issue (the main reason for opening this thread really) and I managed to resolve it!
    As part of my application, I override the default DataGrid behavior for column selection (headerRelease event).
    Instead of sorting, I change the column's header looks and define it as Selected (for showing its dynamic properties and enable its deletion).
    At first I did this by setting styles, but the look didn't refresh unless I created a new instance of the header renderer.
    Later I changed thi behavior to work with states, but I left the new header renderer instance creation commands and those lines created all the mess!
    Conclusion -
    If you define a custom header renderer for your datagrid column and then a custom item renderer, don't create a new instance of your header renderer!
    It would still be nice to get some response for the other issues I raised.
    Thanks and have a nice week.

  • Advanced query with dynamic columns

    Hi All,
    I have a table with structure shown below. I need to pull data out of this table and the output should be in a format indicated by the select statement below. I have the following questions and I appreciate if someone could help.
    1. I need to extract 3 years(current year + 2 historical years) worth of data out of this table dynamically(I can't hardcode year). How can I modify the code below so that the select statement returns 3 years worth of data dynamically?
    2. Should I instead calculate each quarter in the select statement using "CASE"? Would this be a good idea and i wouldn't have to deal with the PIVOT function?
    3. The reason I am asking about #2 is because our application requires the out field names to be as CYQ1, CYQ2, CYQ3, CYQ4, LYQ1, LYQ2, LYQ3, LYQ4 etc.(LY = last year). I am not sure if this is possible to do in Pivot table. Could the method outlines
    in #2 be the best practice in my situation?
    Thanks in advance for your thoughts.
    DECLARE @Trans_Summary TABLE(
    [Account_ID] [int] NULL,
    [End_Date] DATE NULL,
    [Amount] [float] NULL,
    [Customer_ID] [int] NULL)
    INSERT @Trans_Summary VALUES(1, '03/31/2013', 100, 123)
    INSERT @Trans_Summary VALUES( 1, '01/31/2013', 200, 123)
    INSERT @Trans_Summary VALUES( 1, '06/30/2013', 100, 123)
    INSERT @Trans_Summary VALUES( 1, '09/30/2013', 100, 123)
    INSERT @Trans_Summary VALUES( 1, '12/31/2013', 100, 123)
    SELECT *
    FROM @Trans_Summary
    PIVOT(SUM([Amount])FOR End_Date IN ([2013-01-31], [2013-03-31], [2013-06-30], [2013-09-30], [2013-12-31])) AS TT

    Yes, you should always use CASE for pivots and never use the PIVOT keyword. The latter gives you somewhat shorter query text, for very little gain.
    As I understand what you are asking for, you can easily do it with CASE without dynamic SQL:
    DECLARE @year char(4) = '2013',
            @q1 = char(4) = '0331',
            @q2 = char(4) = '0630',
            @q3 = char(4) = '0930',
            @q4 = char(4) = '1231'
    SELECT Account_ID,
           SUM(CASE WHEN End_Date = @year + @q1 THEN Amount END) AS CYQ1,
           SUM(CASE WHEN End_Date = dateadd(YEAR, -1, @year + @q1) THEN Amount END) AS LYQ1,
    FROM   tbl
    GROUP  BY Account_ID
    Well, maybe that can be done with PIVOT as well, but I have never learnt how to use the keyword. It just looks difficult to me. And useless.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Flex Advanced datagrid Auto-sort Disable

    is there any way to remove the auto-sorting in advanceddatagrid in flex 3. i need columns to get sorted only on clicking of headers not with the change of value in editable ADG.

    Alright guys I got the answer. The previous coder was using AdvancedDataGridColumnGroup unnecessarily.
    The ADGColumnGroup has a default behavior of not showing sort arrow.
    So the answer is to use ADGColumn.
    Bhargav

  • Problem with dynamic group

    I am running iPlanet process manager 6 SP3. There is an approval group imported from corporate LDAP in an Application, which is running in production mode.
    I have added a new member into this approval group in LDAP, but it appears that this change was not applied in the process? Does process manager perform a real time look up into the LDAP? If not, how long will it take to refresh the role/group infos? or Do I have to restart the app server to refresh the role/group infos?
    Thanks!

    How do I handle this?

  • Advanced Datagrid with average and sum at bottom

    I have an xml file which has the following elements
    <element>
         <price>12</price>
         <type>b</type>
         <name>name1</name>
    </element>
    I'l like to have a tree which is first sorted by name, and then by type. Then it should sum up and average all the prices of each of those elements which have the same type and name.
    Any advice on how I can achieve this is highly appreciated.
    thanks

    Hi,
    try this.
    data w_cat type lvc_s_fcat,
    t_cat type lvc_t_fcat.
    w_cat-fieldname = 'CITYFROM'.
      w_cat-do_sum = 'X'
      APPEND w_cat TO t_cat.
      CLEAR w_cat.
    CALL METHOD r_alv_grid->set_table_for_first_display
        EXPORTING
       i_buffer_active               =
       i_bypassing_buffer            =
       i_consistency_check           =
          i_structure_name              = 'FS'
       is_variant                    =
       i_save                        =
       i_default                     = 'X'
          is_layout                     = w_lay
       is_print                      =
       it_special_groups             =
       it_toolbar_excluding          =
       it_hyperlink                  =
       it_alv_graphics               =
       it_except_qinfo               =
       ir_salv_adapter               =
        CHANGING
          it_outtab                     = itab
          it_fieldcatalog               = t_cat
    EXCEPTIONS
       invalid_parameter_combination = 1
       program_error                 = 2
       too_many_lines                = 3
       others                        = 4

  • Grouping issue on Advanced DataGrid

    Hello,
    I've got an advanced datagrid with 5 columns, The number_Group column has data like this...
    1-10
    1-10
    11-20
    11-20
    11-20
    21-30
    21-30
    21-30
    41-50
    101-110
    When I apply Grouping, it works as expected but the 101-110 group is displayed before the 11-20 group.
    I've tried to set groupingField.numeric = true but that screws it up even more... because 11-20 isn't a number I'm guessing.
    Does anyone know a way around this? I could change the number_Group column to this...
    1
    1
    11
    11
    21
    41
    101
    and groupingField.numeric = true should work but I need the Grouping display to show 1-10, 11-20. Perhaps I can intercept this and modify it?
    Anyone got any ideas?
    Thanks,
    Nick

    Hi, Nicky
    u can solve this problem by grouping function.
    u create ur dataprovider like
    private var myData:ArrayCollection = new  ArrayCollection([{data1:1, data2:10,......},
                                                                                         {data1:1, data2:21, ....}]);
    u declare the grouping function in following manner
    private function myGroupLabelFunction(item:Object, column:AdvancedDataGridColumn):String
    // here u write ur logice to formatting ur dispalying data in advance grid.
    //suppose ur labelfield of datagrid are data1,data2, data3 respectively.
    return item.data1+"-"+item.data2;
    if u do in this way i think it will work.
    if u sucess then give me mark.
    Thanks
    Niranjan

  • Mx_internal_uid problem with advanced datagrid

    I have a XML structure like this:
    <Projekti ...attributes>
    <Tehtava ....attributes />
    <Tehtava ...attributes />
    </Projekti>
    <Projekti...>
    ...etc
    And I'm populating advanced datagrid with this hierarchial
    data, so I can get a tree view in datagrid where there is Projekti
    -nodes and inside them is the Tehtava-nodes.
    Problem:
    When I bind the XML, and the hierarchialdata (that is created
    from the XML) flex automatically adds
    <mx_internal_uid>a324235351514......</mx_internal_uid>
    -nodes inside of the Projekti-nodes. And this causes empty folders
    added in a tree view when user clicks them.
    Is there a simple way to:
    a) prevent thos uid-nodes being created?
    b) filter thos <mx_internal_uid>-nodes out from the
    dataprovider of the advanced datagrid?

    I know this is way after-the-fact, but I just ran into this problem myself today. I found that it generated the mx_internal_uid if the node I was selecting was an XMLList instead of XML. A simple cast fixed the problem.
    P.S. "And this causes empty folders added into a tree view when user clicks on them." makes perfect sense when you're using the XML inside a <mx:Tree>. As soon as you select the item (whether by clicking or programmatically), you get extra nodes in the tree.

  • Efficiently retrieve MANY records with Advanced Datagrid?

    Hi all,
    I've encountered the following issue:
    I have a database with more then 120.000 records, that I want to show with an advanced datagrid.
    It's grouped by 2 ID's, thus showing the results a group within a group. This works perfect!
    Only: it takes a long time before it shows the results, probably because it's downloading all the records at once (with the getAll() function).
    Is there a way to use advanced datagrid more efficiently? Like: first download the two columns that are used to define the groups, and only retrieve data that's visible once you click the group? (In this case, the 2nd group within the 1st group)
    This would greatly increase the loading-time of the whole application.
    Or should I take an other aproach to this application, like, using a tree-component, a simple datagrid, writing alternative update & retrieve functions in AS3 & PHP?
    Thanks!

    Hi Sam, thanks for your help!
    I'm not sure though how to create the returned datastructure?
    Example:
    Product_id
    productname
    category_a
    category_b
    1
    Toy A
    boy
    0-3
    2
    Toy B
    girl
    0-3
    3
    Toy C
    girl
    3-6
    4
    Toy D
    boy
    6-9
    5
    Toy E
    girl
    3-6
    6
    Toy F
    boy
    0-2
    7
    Toy G
    boy
    6-9
    Grouping by [category_a] and [category_b], I would like to get the following in the Advanced Datagrid, but paginated:
    Product_ID
    Productname
    boy
    0-2
    6
    Toy F
    0-3
    1
    Toy A
    6-9
    4
    Toy D
    7
    Toy G
    girl
    0-3
    2
    Toy B
    3-6
    3
    Toy C
    5
    Toy E
    In my PHP-service, I would create the following query:
         public function getProducts_paged($startIndex, $numItems) {
              $stmt = mysqli_prepare($this->connection, "SELECT product_id, category_a, category_b, productname FROM $this->tablename GROUP BY category_a, category_b LIMIT(?,?)");
              $this->throwExceptionOnError();
              mysqli_bind_param($stmt, 'ii', $startIndex, $numItems);
              mysqli_stmt_execute($stmt);
              $this->throwExceptionOnError();
              $rows = array();
              mysqli_stmt_bind_result($stmt, $row->product_id, $row->category_a, $row->category_a, $row->productname);
             while (mysqli_stmt_fetch($stmt)) {
               $rows[] = $row;
               $row = new stdClass();
               mysqli_stmt_bind_result($stmt, $row->product_id, $row->category_a, $row->category_a, $row->productname);
              mysqli_stmt_free_result($stmt);         
              mysqli_close($this->connection);
              return $rows;
    This will give me the right structure, Right?
    Now:
    - How to tell the Advanced Datagrid which 2 groups to apply?

Maybe you are looking for

  • Saving a .pdf Created in Flare9 as Reader Extended PDF

    When I first installed Adobe Acrobat X Pro and built .pdfs from Flare, I was able to save the .pdf with the "Reader Extended PDF" function. Now, that capability is no longer available and in order to access this feature I must save the .pdf and open

  • "apple application support was not found" now what?

    Installing itunes on Vista just to manage content on my ipad and I got the above message. How do I fix that?

  • Library Backups?

    billincolo wrote: what is a serious backup method? Splitting this from another thread... Your method of backup (in this case iPhoto libraries) depends on many factors, such as the kind of Mac you have, the number of images you take, the size of image

  • How can I stop firefox from checking add-ons and displaying the What's new page each time I launch it

    Since upgrading to the latest version, I have viewed read and interacted with everything on the What's new page. I have done this a number of times but the page is still opened each time I launch Firefox. In addition it shows my homepage in a second

  • Communicator 9300i will not display the Blackberry...

    I have Communication 9300i which I have installed the Blackberry Connect software on to but it does not display the Blackberry serivce in the messaging section. I have unistalled the software a couple of times and reinstalled it, but to no avail. Any