How to hide itemRenderers in the Grouped rows of an AdvancedDataGrid?

I am using an AdvancedDataGrid and showing a comboBox as the itemRenderer and also the editRenderer. However I am seeing the combobox in the grouped rows also. Below is the code I am using and also attached the screenshot of the app. Please help.
TestAdvGridGrpRen.mxml
===================
<?xml version="1.0"?>
<!-- dpcontrols/adg/SummaryGroupADGCustomSummary.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        <![CDATA[
            import mx.collections.ArrayCollection;
            import mx.controls.advancedDataGridClasses.AdvancedDataGridColumn;
            import mx.collections.IViewCursor;   
            import mx.collections.SummaryObject;
[Bindable]
private var dpFlat:ArrayCollection = new ArrayCollection([
  {Region:"Southwest", Territory:"Arizona",
      Territory_Rep:"Barbara Jennings", Actual:38865, Estimate:40000},
  {Region:"Southwest", Territory:"Arizona",
      Territory_Rep:"Dana Binn", Actual:29885, Estimate:30000},
  {Region:"Southwest", Territory:"Central California",
      Territory_Rep:"Joe Smith", Actual:29134, Estimate:30000},
  {Region:"Southwest", Territory:"Nevada",
      Territory_Rep:"Bethany Pittman", Actual:52888, Estimate:45000},
  {Region:"Southwest", Territory:"Northern California",
      Territory_Rep:"Lauren Ipsum", Actual:38805, Estimate:40000},
  {Region:"Southwest", Territory:"Northern California",
      Territory_Rep:"T.R. Smith", Actual:55498, Estimate:40000},
  {Region:"Southwest", Territory:"Southern California",
      Territory_Rep:"Alice Treu", Actual:44985, Estimate:45000},
  {Region:"Southwest", Territory:"Southern California",
      Territory_Rep:"Jane Grove", Actual:44913, Estimate:45000}
            // Callback function to create
            // the SummaryObject used to hold the summary data.
            private function summObjFunc():SummaryObject {
                // Define the object containing the summary data.
                var obj:SummaryObject = new SummaryObject();
                // Add a field containing a value for the Territory_Rep column.
                obj.Territory_Rep = "Alternating Reps";
                return obj;
            // Callback function to summarizes
            // every other row of the Actual sales revenue for the territory.
            private function summFunc(cursor:IViewCursor, dataField:String,
                operation:String):Number {
                var oddCount:Number = 0;
                var count:int = 1;
                while (!cursor.afterLast)
                    if (count % 2 != 0)
                        oddCount += cursor.current["Actual"];
                    cursor.moveNext();
                    count++;
                return oddCount;
      ]]>
    </mx:Script>
    <mx:AdvancedDataGrid id="myADG"
        width="100%" height="100%"
        initialize="gc.refresh();">      
        <mx:dataProvider>
            <mx:GroupingCollection id="gc" source="{dpFlat}">
                <mx:Grouping>
                   <mx:GroupingField name="Region"/>
                   <mx:GroupingField name="Territory">
                      <mx:summaries>
                         <mx:SummaryRow summaryObjectFunction="summObjFunc"
                            summaryPlacement="first">
                            <mx:fields>
                               <mx:SummaryField dataField="Actual" summaryFunction="summFunc"/>
                            </mx:fields>
                         </mx:SummaryRow>
                      </mx:summaries>
                   </mx:GroupingField>
                </mx:Grouping>
            </mx:GroupingCollection>
        </mx:dataProvider>      
        <mx:columns>
            <mx:AdvancedDataGridColumn dataField="Region"/>
            <mx:AdvancedDataGridColumn dataField="Territory_Rep"
                headerText="Territory Rep"/>
            <mx:AdvancedDataGridColumn headerText="Actual" dataField="Actual"
            rendererIsEditor="true"
            itemRenderer="TestStatusTypeEditor"
            editorDataField="type"/>
            <mx:AdvancedDataGridColumn dataField="Estimate"/>
        </mx:columns>
   </mx:AdvancedDataGrid>
</mx:Application>
TestStatusTypeEditor.mxml
====================
<?xml version="1.0" encoding="utf-8"?>
<mx:ComboBox xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="OnInit()" >
<!-- This is the content of the ComboBox.
<mx:dataProvider>
<mx:Object label="Cog" />
<mx:Object label="Sproket" />
</mx:dataProvider>
-->
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
        [Bindable]
        public var cards:ArrayCollection = new ArrayCollection(
            [ {label:"38865", data:1},
              {label:"29885", data:2},
              {label:"29134", data:3},
              {label:"52888", data:4},
              {label:"38805", data:5},
              {label:"55498", data:6},
              {label:"44985", data:7},
              {label:"44913", data:8}]);
private function OnInit():void
dataProvider = cards;
* This override of set data compares the data.label against the label property
* of each item in the dataProvider (above). This code is written a bit more
* generically than necessary, but it would allow you to have a long list
* in the dataProvider and not have to change this code.
override public function set data(value:Object):void
super.data = value;
var list:ArrayCollection = dataProvider as ArrayCollection;
for(var i:int=0; i < list.length; i++)
if( String(value.statusName) == list[i].label ) {
selectedIndex = i;
* This getter is the one identified as the editorDataField in the list for
* the itemEditor.
public function get type() : String
if( selectedItem ) {
return selectedItem.label;
else {
return null;
]]>
</mx:Script>
</mx:ComboBox>

Solved this issue by using mx:rendererProviders element for my AdvancedGrid. Using the depth parameter gives me the ability to hide the itemRenderer for the Grouped rows.
    <mx:AdvancedDataGrid id="myADG"
        width="100%" height="100%"
        initialize="gc.refresh();">       
        <mx:dataProvider>
            <mx:GroupingCollection id="gc" source="{dpFlat}">
                <mx:Grouping>
                   <mx:GroupingField name="Region"/>
                   <mx:GroupingField name="Territory">
                      <mx:summaries>
                         <mx:SummaryRow summaryObjectFunction="summObjFunc"
                            summaryPlacement="first">
                            <mx:fields>
                               <mx:SummaryField dataField="Actual" summaryFunction="summFunc"/>
                            </mx:fields>
                         </mx:SummaryRow>
                      </mx:summaries>
                   </mx:GroupingField>
                </mx:Grouping>
            </mx:GroupingCollection>
        </mx:dataProvider>       
        <mx:columns>
            <mx:AdvancedDataGridColumn dataField="Region"/>
            <mx:AdvancedDataGridColumn dataField="Territory_Rep"
                headerText="Territory Rep"/>
            <mx:AdvancedDataGridColumn headerText="Actual" dataField="Actual"
            rendererIsEditor="true"
            editorDataField="type"/>
            <mx:AdvancedDataGridColumn dataField="Estimate"/>
        </mx:columns>
<mx:rendererProviders>
    <mx:AdvancedDataGridRendererProvider
        columnIndex="2"
        columnSpan="1"
        depth="3"
        renderer="TestStatusTypeEditor"/>
</mx:rendererProviders>
   </mx:AdvancedDataGrid>

Similar Messages

  • How to hide cells in the sumation row in bps web layouts

    Hello xperts,
    I'm looking for a possibility to hide certain cells in the sumation row within a planing table (layout) over the webinterface builder.
    can anybody help me.
    I know there is a possibility to influence a table with the tableinterface for reporting tables.
    Is there any similar possibility in BPS- Web interface builder like a java script ?
    Please help !!!

    Hi Thomas,
    what exactly do you mean by "hide certain cells"? Do want to empty the contents of the cell or actually hide the cell? Hiding works for entire rows or entire tables, but hiding colums or even single cells is a bit more difficult (given, that when you hide one cell, the table loses its rectangular shape and the rows and columns don't match anymore ).
    I mangaged to change the appearance of certain objects with javascript. But that works only if you have an ID or NAME attribute in the HTML-source. Let's say you have a button and want to make it disappear.
    1. Create the button in the wi builder, name it button1.
    2. Create a text/html field, mark the html flag.
    3. Edit the long text of the field:
    <script>
      document.getElementById('button1').style.display='none';
    </script>
    That will make the button disappear. But I don't think that the display attribute will have any effect on a TD. You can try with style.InnerHTML or maybe set style.color to the background color. But in any case, the TD in the HTML code needs to have an ID or NAME. Otherwise it can't be referred. Maybe changing the bsp with SE80 helps?
    Simon

  • How to hide edit link for  some rows in report? (according to value of col)

    Helo,
    How to hide edit link for some rows in report? (according to value of column)
    regards
    siyavuş

    Hi siyavuş
    You can do this by taking the edit link off the report and putting it into your report SQL.
    Use something like Select CASE WHEN (condition)  THEN
    'Put your edit link in here as an html Anchor like<a href="(target)">Edit</a>'
    ELSE
    tt.value
    END edit_link
    FROM test_table tthope it helps,
    Gus..
    You can reward this reply (and those of other helpers) by marking it as either Helpful or Correct.
    This allows forum users to quickly find the correct answer.
    ;-)

  • How to print/list all the groups/users present in Weblogic using Java code

    Hi,
    Weblogic version : 11.1.1.5
    How to print/list all the groups/users present in Weblogic using Java code
    I want to make a remote connection to Weblogic server and print all the users/groups present in it.
    I have gone through the below mentioned site, but I cannot use the same approach since most of the API' are deprecated for example "weblogic.management.MBeanHome;"
    http://weblogic-wonders.com/weblogic/2010/11/10/list-users-and-groups-in-weblogic-using-jmx/
    Thanks in advance,
    Edited by: 984107 on 05-Feb-2013 05:26
    Edited by: 984107 on 05-Feb-2013 22:59

    see this http://www.techpaste.com/2012/06/managing-user-groups-wlst-scripts-weblogic/
    Hope this helps.

  • How to set focus on the last row of JTextPane

    how to set focus on the last row of JTextPane?
    import javax.swing.*;
    import javax.swing.text.html.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MyGUITest extends JPanel implements ActionListener
    {   public static void main(String[] args)
        {   SwingUtilities.invokeLater(new Runnable()
             {   public void run()
              {    JFrame f = new JFrame("My GUI");
                  MyGUITest GUI = new MyGUITest();
                  GUI.setOpaque(true);
                  f.setContentPane(GUI);
                  f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                  f.pack();
                  f.setLocationRelativeTo(null);
                  f.setVisible(true);
        JTextPane txtP;
        JButton add;
        HTMLEditorKit hek;
        HTMLDocument hd;
        String txt;
        MyGUITest()
        {     this.setLayout(new BorderLayout());
         this.setPreferredSize(new Dimension(400,200));
         txtP = new JTextPane();
         txtP.setEditable(false);
         txtP.setContentType("text/html");
         txtP.setText("");
         hek = new HTMLEditorKit();
         txtP.setEditorKit(hek);
         hd = new HTMLDocument();
         txtP.setDocument(hd);
         JScrollPane sTxtA = new JScrollPane(txtP);
         add = new JButton("add");
         add.addActionListener(this);
         sTxtA.setBorder(BorderFactory.createTitledBorder(""));
         this.add(sTxtA, BorderLayout.CENTER);
         add(add, BorderLayout.SOUTH);
         new Thread(new Runnable()
         {   public void run()
             {   while(true)
              {   try
                  {     Thread.sleep(100);
                  }catch(InterruptedException ex)
                  {     ex.printStackTrace();
                  appendText("This is <b>HTML</b> text");
                  //add.doClick();
         }).start();
        public void actionPerformed(ActionEvent e)
        {     txt = "<b>asd</b>";
         try
         {   hek.insertHTML(hd, hd.getLength(), txt, 0, 0, null);
         }catch(Exception ex){   ex.printStackTrace();   }
        public void appendText(String txt)
        {     try
         {   hek.insertHTML(hd, hd.getLength(), txt, 0, 0, null);
         }catch(Exception ex){   ex.printStackTrace();   }
    }thanks~

    anIdiot wrote:
    im not sure what is the caret location...So don't youthink you should have looked for it in the API?
    anyway, i want the scroll bar to scrolled down automatically when the output is displayed.
    normally, the scroll bar is scrolled down automatically when a new text is inserted, but it doesnt work on this timeGo through camockr's http://tips4java.wordpress.com/2008/10/22/text-area-scrolling/
    db

  • Anyone knows how to hide or dim the menu bar ?

    Anyone knows how to hide or dim the menu bar ?

    MagicMenu, but it may no longer work.
    Auto-hide the dock and menubar on a per-app basis .
    Hide Your Mac Menu Bar and Dock for a Cleaner Desktop.
    All found doing a Google search. Why not give that a try first before posting here.

  • Disable the dragging of the "group" rows

    We are using the AdvancedDataGrid as a tree dataGrid, using
    GroupingCollection as the dataProvider. The items in the dataGrid
    can be dragged, so dataGrid.dragEnabled is set to "true".
    But by setting dragEnabled to true, all rows seems to be
    draggeable, even the "group" rows! We would like to disable the
    possibility to drag the group rows, without managing the entire
    drag/drop process ourself using the DragManager. Is it possible?
    Thanks in advance!

    Any help?

  • I joined this community in error and don't know how to delete myself from the group. Can someone please advise me on this ?

    I joined this community in error and don't know how to delete myself from the group. Can someone please tell me how to do that ?
    Thanks,
    Skeebo

  • How to hide or make the row invisible in RTF report?

    Hi ,
    I am setting a flag = 'Y' in one condition as i want to display records only if flag = 'Y'. It is not displaying data in case flag != 'Y'.But it is displaying empty row in report for the record which does not have flag = ' Y'. How to hide those empty rows?
    See following code for example:
    <?for-each: LIST_G_STORE_ID/G_STORE_ID?>
    <?xdofx: if STORE_ID = '' then '-' else STORE_ID?>
    <?for-each: LIST_G_TRANSACTION/G_TRANSACTION?>
    <?for-each: Q1?><?if: PLAN_CODE = 'PLN'?><?xdoxslt:set_variable($_XDOCTX,'flag', 'Y')?><?end if?><?end for-each?>
    <?if: xdoxslt: get_variable($_XDOCTX,'flag') = 'Y'?><?xdofx: if TRN_DATE = '' then '-' else TRN_DATE?><?end if?>
    <?for-each@inlines:LIST_Q1/Q1?>
    <?if: xdoxslt: get_variable($_XDOCTX,'flag') = 'Y'?><?xdofx: if INVC_NUM= '' then '-' else INVC_NUM?><?end if?>
    <?for-each@inlines:LIST_Q1/Q1?><?if: xdoxslt: get_variable($_XDOCTX,'flag') = 'Y'?><?xdofx: if substr(PLAN_CODE,1,3) != 'PLN' then PRODUCT_CODE?><?xdofx: if PLAN_CODE!= 'PLN' then ','?><?end if?><?end for-each?>
    <?end for-each?><?xdoxslt:set_variable($_XDOCTX,'flag','N')?>
    <?end for-each?>
    <?end for-each?>
    please advice or let me know if more detail is needed.
    Thanks in Advance!!

    <?for-each:LIST_G_STORE_ID/G_STORE_ID [PLAN_CODE ='PLN' ]?> will only show the rows where that value of xml field PLAN_CODE is equal to 'PLN'.
    Hope this helps
    Domnic
    Edited by: Domnic_JDE_BIP on Apr 12, 2010 5:47 PM

  • How can I get only the dual rows?

    Dear gurus,
    I want to retrieve the rows that are dual in my SQL.
    select grb.num_matricula
    from gb_ficha_financ_assistido gff,
    gb_rubricas_previdencial grp,
    gb_recebedor_beneficio grb
    where gff.cd_rubrica = grp.cd_rubrica
    and (gff.cd_fundacao = grb.cd_fundacao
    and gff.seq_recebedor = grb.seq_recebedor)
    and grp.id_rub_suplementacao = 'S'
    and gff.dt_referencia = '01/12/2004'
    group by grb.num_matricula
    The query above return 1414 rows...
    But when I execute the query below I recived 1430 rows. The only modification is the column cod_entid that was add.
    select grb.num_matricula matricula ,grb.cod_entid
    from gb_ficha_financ_assistido gff, gb_rubricas_previdencial grp,
    gb_recebedor_beneficio grb
    where gff.cd_rubrica = grp.cd_rubrica
    and (gff.cd_fundacao = grb.cd_fundacao
    and gff.seq_recebedor = grb.seq_recebedor)
    and grp.id_rub_suplementacao = 'S'
    and gff.dt_referencia = '01/12/2004'
    group by grb.num_matricula, grb.cd_empresa
    The results let me think that exists in some cases diferents cod_entid with the same num_matricula and this is wrong.
    I wanna do a SQL to recoup only the rows that has duplications.
    Is this possible?
    Regards

    You can use the following to find the duplicates:
    select num_matricula matricula, cod_entid, count(*)
    from gb_recebedor_beneficio
    group by num_matricula matricula, cod_entid
    having count(*) > 1
    However, you seem to have a mismatch in your select and group by clauses in your second query. You have grb.cod_entid in your select clause and grb.cd_empresa in your group by clause. That combination will not even run without error, so what you posted must not be what you ran to get the 1430 rows, so you might want to re-check your code carefully.

  • Nokia N97 How to hide images from the photo browse...

    I'm not even going to ask about how to hide sensitive images, i just deleted them, but still
    there are several programs that use images for they're normal behaviour, i had this same issue
    with my nokia n95, but i simply set the image atributes of the pictures i didn't want to show in the photo browser,
    and that solved the problem, but with my new n97 this is of no use, i also tryed setting the image atribute as sys file
    and that did not solvet either... Please help, i do not like having 500 images from a software showing up in my gallery...
    Thanks in advance

    how to move image from gallery to a certain album (not copy)

  • How to make use of the 'Groups' in Screen Layout?

    Hi All,
    I have a screen with 10 input fields (F1, F2, .. F10).
    I set the 'Groups' attribute in the screen layout to 'DIS'.
    How could I make use of this 'Groups' attribute so that when I loop the screen, I will only disable fields with the 'Groups' attribute set to 'DIS'? Thanks
    I tried the following codes, but it's not working:
      LOOP AT SCREEN.
        IF SCREEN-GROUPS IS NOT 'DIS'.
          SCREEN-INPUT = '1'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    It says ==> The data object 'SCREEN' does not have a component called 'GROUPS'.

    In the Attributes of a screen field, there is an attribute called "Groups". This has 4 options for input (4 text boxes)
    SCREEN has 4 fields GROUP1, GROUP2, GROUP3 and GROUP4.
    The first text box under Groups attribute corresponds to SCREEN-GROUP1,
    2nd text box for SCREEN-GROUP2
    3rd text box for SCREEN-GROUP3
    4th text box for SCREEN-GROUP4
    Hope this helps.
    Thanks,
    Balaji

  • How to give a checkbox the value "row number" (like [row selector])

    I like to define a checkbox with htmldb_item.checkbox and give the checkbox the value 'row number'.
    It has to be the row number as displayed. Therefore I cannot use rownum or row_number() because the htmldb sorting functionality change the sequence after the row numbers are given.
    How can I give the checkbox this value, or as alternative how can I get the current row (checkbox element) in javascript from the checkbox onclick event.

    Vikas,
    Thanks a lot.
    This works.
    I use this number also to construct javascript and I walk in problems which are also solved now.
    therefore for anyone else who also want to use '#ROWNUM#'. keep in mind that for the sql #ROWNUM# is just a string and should be treated as a string therefore use quotes around it. The #ROWNUM# string is translated after executing the query, when the page is constructed from the result of the query.
    Fred.

  • How to add a button to the grouped data in an AdvancedDataGrid?

    Hi,
    Can anyone please suggest how to add a button to the grouped data in the AdvancedDataGrid?
    I have tried extending the AdvancedDataGridGroupItemRenderer and using it as the groupItemRenderer but its not reflecting.
    For the leaf node the itemRenderer property works just fine.
    Please help!

    HI ,
    I want to add a push button on the ALV list out put which is comming as a pop up and I want this using classes and methods.
    I have got a method IF_SREL_BROWSER_COMMANDS~ADD_BUTTONS from class cl_gos_attachment_list  but still I am unable to get any additional button on the output ALV popup.
    Please help.
    Regards,
    Kavya.

  • How to hide one of the two Multi level categorization blocks in SRVR?

    Hi
    I am trying to hide one of the multilevel categorization blocks in SRVR(SERVICE request)
    Can it be done by configuration in BSP workbench. If yes then how? I went to the view but I am not able to remove the block
    Please help.
    Thanks
    Tarang

    Go to BSP_WD_CMPWB and create a new view by copying existing and remove the 2nd category block.
    This can also be done directly from webui.
    Regards
    Surya

Maybe you are looking for

  • Nearly new Laptop in for repair, comes back broken, no help from Lenovo.

    In February of this year I purchased a built to order Lenovo Thinkpad W510. It's a beautiful machine, and I was overwhelmingly satisfied for until about two weeks ago when the screen randomly went berserk, crazy flashing and horizontal lines all over

  • AIR apps with serial number

    Is there a way to simply add a serial number type of component that would prompt before instal of the application on the desktop? Thanks

  • Xl reporter installation issues

    Hello First please accept my apologies because I know this question has been asked but I haven't found the answers I needed. . I have got 90 % of the XL reporter installation not working. In that 90 %, I have - half issues with a missing COM module i

  • European ATV3 and US iTunes account possible?

    Can I use my US iTunes account with an ATV3 I buy in Europe (Holland) or will the ATV3 only accept accounts from the country it was purchased in? tnx /p

  • 10.5.8 problems

    I ran 10.5.6 for a long time on my 1.8 GHz Power PC G5 with no problems. When I updated to 10.5.8 Combo here are some of the problems I had: 1. Couldn't restart or shutdown from the Apple menu (had to use the Power Button manually) 2. Some Menu icons