Setting row color in REUSE_ALV_GRID_DISPLAY_LVC

Hi,
I'm not sure if this function perhaps is not released or has bugs?  I didn't see any OSS notes.  I've read several sources on how to set the color for a given line and I'm not sure why I don't see it.  I see the values in my internal table in the ROWCOLOR column.
We are on 4.6C and I wanted to use the LVC function to move toward the ECC versions of the structures ( LVCS_LAYO instead of SLIS_S_LAYOUT).  Perhaps this function module is not really supported???
Could the ZEBRA parameter throw it off?
Could it be a buffer issue?  I've tried it alternate ways and don't see a difference.
Thanks for any suggestions,
Ray
Here is the code I'm using to set the layout and define the table.:
gs_alv-callback_pf_status    = 'PF_STATUS_SET'.
  gs_alv-callback_user_command = 'USER_COMMAND'.
  gs_alv-callback_program      = sy-repid.
  gs_alv-structure_name        = 'ZHUS_ST_SP_REPORT'.
  gs_alv-itabname              = 'GT_DATA'.
  gs_alv-itabwaname            = 'GS_DATA'.
  gs_layo-zebra                = 'X'.
  gs_layo-cwidth_opt           = 'X'.
  gs_layo-box_fname            = 'SELECTED'.  " Checkbox
  gs_layo-info_fname           = 'ROWCOLOR'.
  gs_layo-sel_mode             = 'B'. "Default - multiple rows
  CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
    EXPORTING
      i_structure_name             = gs_alv-structure_name
    CHANGING
      ct_fieldcat                  = gt_fcat.
I set the color in my list table:
ls_data-rowcolor = 'C600'.
      APPEND ls_data TO gt_data.
This is how I call the grid:
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
      i_buffer_active                   = 'X'
      i_callback_program                = gs_alv-callback_program
      i_callback_pf_status_set          = gs_alv-callback_pf_status
      i_callback_user_command           = gs_alv-callback_user_command
      i_structure_name                  = gs_alv-structure_name
      i_grid_title                      = gs_alv-grid_title
      i_grid_settings                   = gs_glay
      is_layout_lvc                     = gs_layo
      it_fieldcat_lvc                   = gt_fcat
      it_excluding                      = gt_excluding
      i_default                         = gs_alv-default
      i_save                            = gs_alv-save
      is_variant                        = gs_disvariant
      it_events                         = gt_event
      it_event_exit                     = gt_event_exit
      is_print_lvc                      = gs_prnt
    TABLES
      t_outtab                          = <gfs_t>
Edited by: Raymond Mannion on Jun 30, 2009 8:09 PM
Edited by: Raymond Mannion on Jun 30, 2009 8:10 PM

THis should help you:
Re: 'Reuse_alv_grid_display' : making a specific row bold
[ALV] Text in color and bold

Similar Messages

  • Setting Row Color of the JTable

    Hi,
    I wanted to set the first row and first column of the JTable .
    Can anybody help me in this? I read CellRendering but didn't understood when getTableCellRendererComponent(...) method get called and how it works.
    I realy appreciate if anybody explains me.
    Thanks,
    Padmashree

    Hi,
    If my understading is correct, You are trying to set the color of the first column of the first row.
    "Renderer" returns the component used for drawing the cell. It applies for all the cell. Method called
    "GetTableCellRendererComponent" is used to configure the renderer appropriately before drawing.
    So the following parameters are provided to acheive it.
    table - the JTable that is asking the renderer to draw; can be null
    value - the value of the cell to be rendered.
    isSelected - true if the cell is to be rendered with the selection highlighted; otherwise false
    hasFocus - if true, render cell appropriately.
    row - the row index of the cell being drawn.
    column - the column index of the cell being drawn
    So to acheive your requrement, you have to do something like this.
    1 - apply the required color to first cell of the first row
    2 - configure in such a way that it works when the renderer reads first row and first column.
    For. e.g To set the background color as Blue,
         if(row == 0) && ( column == 0){
         this.setBackground(Color.Blue);                          }else {
              this.setBackground(defaultColor);
    Hope it gives a good picture.

  • Setting row color in JTable

    I am trying to display some rows in a JTable in a different color regardless of selection status. The row color criteria would be from data from the object in the row, i.e., given a certain status of a record, I would want to show it as red instead of black.

    A few optimizations:
    class StatusColorRenderer
    extends DefaultTableCellRenderer
        public StatusColorRenderer()
            // super(); not needed, call by default
            setOpaque(true);
            // DefaultTableCellRenderer returns itself as a CellRenderer Component, it extends JLabel so you can call setOpaque on it
    // since this method is called at every paint for every cell it should be HIGHLY optimized
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
        Component c = super.getTableCellRendererComponent( table, value, isSelected, hasFocus, row, column);
        MyObjectClass myObject  = ( MyObjectClass ) myTableModel.getMyVector().elementAt(row);
        <SomeClass> myStatus = myObject.getTheStatus();
        if ( myStatus.compareTo(Status.BAD_STAT) == 0)
            c.setForeground(Color.red);
        else if (myStatus.compareTo(Status.IN_PROGRESS) == 0)
            c.setForeground(Color.green);
        else if ( myObject.getOtherFactor().compareTo(OtherFactors.NOT_DEFAULT) ==  0)
            c.setForeground(Color.blue);
        else
            c.setForeground(Color.black);
        // c.repaint(); NEVER DO THAT
        return c;
    StatusColorRenderer myRenderer = new StatusColorRenderer();
    // only one instance of the renderer
    for ( int i = myTableModel.getColumnCount() - 1 ; i >= 0 ; i-- )
       //column = myTable.getColumnModel().getColumn( i );
       myTable.setDefaultRenderer( myTable.getColumnClass( i ),
                                                myRenderer );
    }Comment:
    AbstractTableModel and DefaultTableModel.getColumnClass method returns Object.class, it is used by the JTable to setup the editor and the renderer of a column
    so if you're using the DefaultTableModel and JTable without overriden getColumnClass, you can set a generic renderer for your JTable by using:
    myTable.setDefaultRenderer( Object.class, myRenderer );

  • How to set background color in row of JTable ?

    i am new in java please tell me about How to set background color in row of JTable ? please example code. Thnak you.

    Here is an example: http://www.javaworld.com/javaworld/javaqa/2001-09/03-qa-0928-jtable.html
    For more info on how to use tables read the swing tutorial: http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
    ICE

  • How to set the color to the particular row in a report

    Hi
    I have a report in which I have an edit link(I changed the id as edit link)..When I click that link, all the details(the whole row details) will be appearing on the items nearer to the report to save the changes....
    I want to set the color for the particular row when a link is clicked and the color should not be changed until I save the changes in items...After saving the changes, the report should come in the normal color...this is my requirement..i refered many forums regarding this...But could not find solution....If anyone knows,please help me...
    Fazila

    Here is how I would implement
    Create renderer
    Add SkinnableContainer element and create a skin for this container namely SkinnableContainerSkin
    find the fill section in the skin
    add bitmap fill to the fill section and give the source of the image which you are planning to use(Hopefully this is a direct way of doing, may be you need to hack this a little to get it to work)
    I've never tried this, but should help you give some idea.

  • How to set a colored Border in ALV OO aroung a row

    Hi there,
    i would like to know if it is possible to set a colored border around an entier row.
    I tried to debug er_data_change_protokol to figuere out how they do their cell bordering but i wasn't successful. Inet an FoSe didn't neither reveal anything, so befor i waste more time i ask the pro's.
    thanks in advance
    mathias

    Also refer:
    [http://abaplovers.blogspot.com/2008/05/changing-color-of-alv-grid-in-sap-abap.html]

  • Setting alternate row color of DataGridColumn

    Is there a way to set alternate row color of a
    DataGridColumn? I need to set different alternating row color to
    different DataGridColumn.

    Please Check this example
    http://www.flex4ex.com/?p=9

  • Is there a Terminal command to set alternate row colors in Mail?

    I'd like to enable the alternate row colors in the message list, but the only way I can find to do it requires Developer tools to be installed.
    Not bad for my Mac, but it seems a bit of a workload for the other 19 Macs in the office. There's nothing in Onyx or Secrets that'll do this.
    Here's what I found on the web: http://pjkh.com/articles/2007/10/08/alternating-row-colors-in-apple-mail
    There's a plug-in called WideMail which I'm using but it doesn't seem 100% stable.
    Thanks

    Just do the hack once and copy that version of the Mail.app application (or just the MessageViewerContents.nib file) to the other machines. Just make sure that they are running exactly the same version of Mail and MacOS X. This hack will probably not work in Snow Leopard, by the way.

  • Setting Font Color and Bold Property in ALV Grid

    I have a requirement to set the font in particular ALV Cells  in red color.
    Also this font (text) has to be set to Bold.
    I know how to set cell coloring in ALV Grid, but have no idea regarding how to set font color.
    Could please give me an idea/code segment/suggestion.
    Thank You!

    Please refer this post
    Coloring of ROWS in ALV tree

  • To change the subtotals row color in ALV(Grid / List ) .

    I am trying to change the color of a row which gives the subtotal...in ALV report...
    but it is not working....
    I have used the following code but not getting where i m wrong
    I have u sed the following code wih the help of our forum only...
    <CODE>
    TYPE-POOLS: SLIS.
    *& Internal Table Delcaration
    DATA : BEGIN OF IT_SCALE OCCURS 0,
             DATUM LIKE ZSCALE-DATUM,
             MCOD1 LIKE ZSCALE-MCOD1,
             MATNR LIKE ZSCALE-MATNR,
             MAKTG LIKE ZSCALE-MAKTG,
             MEINS LIKE ZSCALE-MEINS,
             RATE LIKE ZSCALE-RATE,
             TOTAL LIKE ZSCALE-TOTAL,
             LI_COLOR(4),
           END OF IT_SCALE.
    DATA : INDEX LIKE SY-TABIX.
    *& ALV Data Declaration
    DATA: IT_FIELDCAT  TYPE SLIS_T_FIELDCAT_ALV.
    DATA: WA_FIELDCAT  LIKE LINE OF IT_FIELDCAT.
    DATA : T_LIST_TOP_OF_PAGE TYPE SLIS_T_LISTHEADER.
    DATA : IT_EVENTS   TYPE SLIS_T_EVENT WITH HEADER LINE.
    DATA : G_SAVE(1)   TYPE C VALUE 'A',
           GX_SAVE(1)  TYPE C VALUE 'A',
           GX_VARIANT  LIKE DISVARIANT,
           G_VARIANT   LIKE DISVARIANT,
           GS_LAYOUT   TYPE SLIS_LAYOUT_ALV,
           T_FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
           T_I_EVENT      TYPE SLIS_ALV_EVENT.
    DATA : L_LIST(105)    TYPE C,         "Store the Top-of-page headings
           L_DATEFROM(10) TYPE C,         "Store date in top-of-page
           L_DATETO(10)   TYPE C.         "Store date in top-of-page
    <code>
    START-OF-SELECTION.
      PERFORM GET_DATA.
      PERFORM ALV_FIELDCAT.
      PERFORM GET_EVENTS.
      PERFORM SUB_COMMENT_BUILD USING T_LIST_TOP_OF_PAGE.
      PERFORM ALV_DISPLAY.
    FORM GET_DATA .
    DATA : LINE_COLOR.
      SELECT DATUM MCOD1 MATNR MAKTG MEINS RATE TOTAL
             FROM ZSCALE INTO CORRESPONDING FIELDS OF TABLE IT_SCALE
             WHERE DATUM IN S_DATE
               AND LIFNR IN S_LIFNR
               AND MATNR IN S_MATNR.
    loop at IT_SCALE.
      LINE_color = LINE_color + 2.
      if LINE_color < 7.
        LINE_color = 1.
      endif.
      concatenate 'C' lINE_color '00' into IT_SCALE-li_color.
      modify it_SCALE TRANSPORTING LI_COLOR.
    endloop.
    FORM ALV_FIELDCAT.
      DATA: COUNTER      TYPE I.
      COUNTER = COUNTER + 1.
      WA_FIELDCAT-COL_POS    = COUNTER.
      WA_FIELDCAT-FIELDNAME  = 'DATUM'.
      WA_FIELDCAT-TABNAME    = 'IT_SCALE'.
      WA_FIELDCAT-SELTEXT_L  = 'Date'.
      WA_FIELDCAT-JUST       = 'C'.
      WA_FIELDCAT-NO_ZERO    = 'X'.
      APPEND WA_FIELDCAT TO IT_FIELDCAT.
      CLEAR WA_FIELDCAT.
    .endform.
    FORM ALV_DISPLAY .
    GS_LAYOUT-ZEBRA        = 'X'.
      GS_LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      GS_LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
    gS_layout-no_input          = 'X'.
      gS_layout-totals_text       = 'Totals'(201).
      gS_layout-subtotals_text = 'Subtotal'.
      IF IT_SCALE[] IS INITIAL.
        MESSAGE I001(38) WITH 'No Data to Display'.
      ELSE.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM             = SY-REPID
       IS_LAYOUT                      = GS_LAYOUT
      IT_FIELDCAT                    = IT_FIELDCAT
       I_SAVE                         = G_SAVE
       IS_VARIANT                     = GX_VARIANT
      TABLES
        T_OUTTAB                       = IT_SCALE[].
      ENDIF.
    ENDFORM.                    " ALV_DISPLAY
    ThanX in Adavance....

    Hi Prasad,
    I provided some code snippets for you. Please go through.
    Hope this proves to be helpful to you.
    The steps for coloring a line i the grid is much the same as making a traffic light.
    To color a line the structure of the  table must include a  Char 4 field  for color properties
    TYPES: BEGIN OF st_sflight.
            INCLUDE STRUCTURE zsflight.
          Field for line color
    types:  line_color(4) type c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
    Loop trough the table to set the color properties of each line. The color properties field is
    Char 4 and the characters is set as follows:
    Char 1 = C = This is a color property
    Char 2 = 6 = Color code (1 - 7)
    Char 3 = Intensified on/of = 1 = on
    Char 4 = Inverse display = 0 = of
         LOOP AT gi_sflight INTO g_wa_sflight.
          IF g_wa_sflight-paymentsum < 100000.
            g_wa_sflight-line_color    = 'C610'.
          ENDIF.
          MODIFY gi_sflight FROM g_wa_sflight.
        ENDLOOP.
    Name of the color field
    gs_layout-info_fname = 'LINE_COLOR'.
    Grid setup for first display
    CALL METHOD go_grid->set_table_for_first_display
          EXPORTING i_structure_name = 'SFLIGHT'
                                 is_layout                = gs_layout
          CHANGING  it_outtab                 = gi_sflight.
    Heres another Example for you:
        & Report  Z_ALV_COLOURS                                              &
        & This report shows how to use colours in REUSE_ALV_GRID_DISPLAY     &
        & C = Colour        (all codes must start with 'C')                  &
        & X = Colour number (1-9)                                            &
        & Y = Intensified   (0 = off, 1 = on)                                &
        & Z = Inverse       (0 = off, 1 = on)                                &
        report  z_alv_colours.
        data count_1(1) type c.
    ALV definitions
        type-pools: slis.
        data i_fieldcat type slis_t_fieldcat_alv with header line.
        data i_layout   type slis_layout_alv.
        types: begin of t_alv,
              f1(4) type c,
              f2(15) type c,
              f3(4) type c,
              f4(4) type c,
              f5(4) type c,
              f6(4) type c,
              colour(4)   type c,
              coltab type slis_t_specialcol_alv,
        end of t_alv.
        data: i_alv type standard table of t_alv with header line.
        data l_alvcolor type slis_specialcol_alv.
        & create table entries for LINE colours                              &
        do 9 times.
          count_1 = sy-index.
          clear i_alv.
          concatenate 'C' count_1 '0' '0' into i_alv-f1.
          concatenate 'C' count_1 '0' '0' into i_alv-colour.
          i_alv-f2 = 'Line colour'.
          i_alv-f3 = 'X'.
          append i_alv.
    Intensified
          clear i_alv.
          concatenate 'C' count_1 '1' '0' into i_alv-f1.
          concatenate 'C' count_1 '1' '0' into i_alv-colour.
          i_alv-f2 = 'Line colour'.
          i_alv-f4 = 'X'.
          append i_alv.
    Inverse
          clear i_alv.
          concatenate 'C' count_1 '0' '1' into i_alv-f1.
          concatenate 'C' count_1 '0' '1' into i_alv-colour.
          i_alv-f2 = 'Line colour'.
          i_alv-f5 = 'X'.
          append i_alv.
    Intensified & Inverse
          clear i_alv.
          concatenate 'C' count_1 '1' '1' into i_alv-f1.
          concatenate 'C' count_1 '1' '1' into i_alv-colour.
          i_alv-f2 = 'Line colour'.
          i_alv-f6 = 'X'.
          append i_alv.
        enddo.
    create table entries for CELL colours
        do 9 times.
          count_1 = sy-index.
          concatenate 'C' count_1 '0' '0' into i_alv-f1.
          i_alv-f2 = 'Cell colour'.
          concatenate 'C' count_1 '0' '0' into i_alv-f3.
          concatenate 'C' count_1 '1' '0' into i_alv-f4.
          concatenate 'C' count_1 '0' '1' into i_alv-f5.
          concatenate 'C' count_1 '1' '1' into i_alv-f6.
          append i_alv.
        enddo.
        & Create table entries for CELL colours                              &
        loop at i_alv where f2 = 'Cell colour'.
    Colour cells
          clear l_alvcolor.
          l_alvcolor-fieldname = 'F3'.
          l_alvcolor-color-col = i_alv-f3+1(1).
          l_alvcolor-color-int = i_alv-f3+2(1).
          l_alvcolor-color-inv = i_alv-f3+3(1).
          l_alvcolor-nokeycol = 'X'.
          append l_alvcolor to i_alv-coltab.
          clear l_alvcolor.
          l_alvcolor-fieldname = 'F4'.
          l_alvcolor-color-col = i_alv-f4+1(1).
          l_alvcolor-color-int = i_alv-f4+2(1).
          l_alvcolor-color-inv = i_alv-f4+3(1).
          l_alvcolor-nokeycol = 'X'.
          append l_alvcolor to i_alv-coltab.
          clear l_alvcolor.
          l_alvcolor-fieldname = 'F5'.
          l_alvcolor-color-col = i_alv-f5+1(1).
          l_alvcolor-color-int = i_alv-f5+2(1).
          l_alvcolor-color-inv = i_alv-f5+3(1).
          l_alvcolor-nokeycol = 'X'.
          append l_alvcolor to i_alv-coltab.
          clear l_alvcolor.
          l_alvcolor-fieldname = 'F6'.
          l_alvcolor-color-col = i_alv-f6+1(1).
          l_alvcolor-color-int = i_alv-f6+2(1).
          l_alvcolor-color-inv = i_alv-f6+3(1).
          l_alvcolor-nokeycol = 'X'.
          append l_alvcolor to i_alv-coltab.
          modify i_alv.
        endloop.
        & Configure ALV settings                                             &
    Create field catalog
        perform create_field_catalog using 'F1'     'T_ALV' 'Colour name'.
        perform create_field_catalog using 'F2'     'T_ALV' 'Description'.
        perform create_field_catalog using 'F3'     'T_ALV' 'BaseColour'.
        perform create_field_catalog using 'F4'     'T_ALV' 'Intensified'.
        perform create_field_catalog using 'F5'     'T_ALV' 'Inverse'.
        perform create_field_catalog using 'F6'     'T_ALV' 'Both Inv/Int'.
        perform create_field_catalog using 'COLOUR' 'T_ALV' 'Colour'.
    Layout
        clear i_layout.
        i_layout-colwidth_optimize   = 'X'.
        i_layout-info_fieldname      = 'COLOUR'.   " for line colour
        i_layout-coltab_fieldname    = 'COLTAB'.   " for cell colour
        call function 'REUSE_ALV_GRID_DISPLAY'
          exporting
            i_callback_program      = sy-cprog
            i_callback_user_command = 'USER_COMMAND'
            is_layout               = i_layout
            it_fieldcat             = i_fieldcat[]
            i_default               = 'X'
            i_save                  = 'A'
          tables
            t_outtab                = i_alv.
        & Form  CREATE_FIELD_CATALOG                                          &
        form create_field_catalog using    p_fieldname
                                           p_tabname
                                           p_text.
          i_fieldcat-fieldname        = p_fieldname.
          i_fieldcat-tabname          = p_tabname.
          i_fieldcat-seltext_l        = p_text.
          append i_fieldcat.
        endform.                    " CREATE_FIELD_CATALOG
    For more information about Coloring in ALV, Please refer :
    Coloring Rows in ALV
    Hope this helps you in solving your issue.
    Please Reward Points if any of the above points are helpful to you.
    Regards,
    Kalyan Chakravarthy

  • Set Marker Color Bug

    I was relieved after much digging to find you can make a keyboard shortcut to make a marker of a specific color with just one click.  As opposed to making a marker and then going back to it to change its color.
    However for some reason when using this while playing a clip, this only works in a timeline, or on a video clip.  When I use the same command on an audio only file, i.e. music cue.  It just creates a marker of the default color 1.  - This is only when playing the clip.  If you park the playhead it works as expected no mater what the clip is.
    I'm frustrated, because the main reason I needed this feature was to tap out the beats in music for easier editing while I listen to the music cue (in real time).  I like to use color 1 for each beat in the 4-4 measure, and on the fourth measure tap out a new color so i can see where it repeats.. that way I can easily cut from color 2 to color 2 almost anywhere in the song seamlessly.  Sometimes I choose a third color when the melody loops so I know I can smoothly truncate a song with little to no effort.
    I noticed after the fact I can jump back to the marker and change it's color with the tool.. it just won't do it on an audio file while it's playing.
    Is this just a bug?  Just a bug on my system? Is it an intentional workflow on Adobe's part for some reason?  Anyone else having this problem?
    To map it open up keyboard shortcuts and sift for "set marker color"

    Yes, I know it. But if I set attribute values on my page, everything is right. If I set it from code, there is an error.
    I think that it is a bug, because component, for which I set attribute, has client id like: UIDataId:rowIndex:componentId. I set value to component on the third row, and have this value on components on the third and the fifth row.
    To tell the truth, I am sure, that it is a bug. If it is not so, please tell me, how an I set attribute value to component, which I need. Is there any way? I think, no. And it is a bug.

  • Work with JTable cell (check input, set text color)

    I have a JTable with data
    The task is:
    User inputs some data into cell
    I want to check his input string for equatily with other values in column
    For example, I have these values in column:
    1.example
    2.exercise
    3.execute
    User inputs word "execution" in the same column
    until user inputs "executi" his input string should be red.
    What event I have to listen to if I want to get user input string?
    Also a question:
    Is there any opportunity to work with cell row (copy it to another JTable) ?
    Message was edited by:
    Holod

    i think you should use cell editor as textfield (although that is default for jtable) and then implements document listener and set text color in insert update method.
    try this out :-)

  • Scroll bar and alternate row color in Trinidad table

    I am using Jdeveloper 11g
    I have two question on tinidad table see below sample code
    *1)How to set scroll bar on table*
    *2)how to set different colors for alternate rows*
    <tr:form>
    <tr:panelGroupLayout>
    <tr:panelFormLayout inlineStyle="width:965px; height:512px; margin:50px;">
    <f:facet name="footer">
    <tr:table value="#{bindings.UserFavoriteVO.collectionModel}"
    var="row" rows="#{bindings.UserFavoriteVO.rangeSize}"
    binding="#{UserActionBean.table1}"
    emptyText="#{bindings.UserFavoriteVO.viewable ? 'No rows yet.' : 'Access Denied.'}"
    rowSelection="multiple" id="table"
    inlineStyle="border-width:none; outline-color:ActiveCaption; outline-style:groove; border-color:Navy; color:MenuText; font-size:medium;"
    horizontalGridVisible="true" verticalGridVisible="false">
    Thanks for all help
    Jaydeep

    Hi Sireesha,
    Thanks for reply.
    I forgot to mentioned that i already tried that option *(rowBandingInterval)*
    <tr:table value="#{bindings.UserFavoriteVO.collectionModel}"
    var="row" rows="#{bindings.UserFavoriteVO.rangeSize}"
    binding="#{UserActionBean.table1}"
    emptyText="#{bindings.UserFavoriteVO.viewable ? 'No rows yet.' : 'Access Denied.'}"
    rowSelection="multiple" id="table"
    inlineStyle="border-width:none; outline-color:ActiveCaption; outline-style:groove; border-color:Navy; color:MenuText; font-size:medium;"
    horizontalGridVisible="true" verticalGridVisible="false"
    rowBandingInterval="1">
    but no any success.
    *@ scroll* I found in Frank post it is related to ADF table .So i just want to ask will it be applicable to Trinidad table too.

  • Alternating row color for CF report Builder?

    I have a user who wants one of her reports to display
    alternating row colors for better read clarity. The reports are
    rather lengthy and the rows tend to blend in with eachother.

    Thanks Epulfy. I am going to give this a try later today.
    Much appreciated
    EDIT:: This does work. however I'm not sure how to set a
    rectangle to the background of the report so it's behind my
    details. I draw the rectangle and it just hides whatever I want to
    display. When I look at the report it does alternate with rows, but
    I can only see details from the rows that it does not alternate on.
    Any clue how to set it to the background?

  • Setting cell color in ALV

    Hi All
    I would be greatful if someone could please help...
    I am still attempting to get cells painted within a WDA ALV grid display.
    I have tried to use the method stated in the WDA sap press book - but this method is for use with TABLE element and I am using a ViewContainerUIElement for my table. There are mentions of wonderful ways to color cells in a list display - but I cannot understand how this can be achieved. I currently have this working appart from the numeric numbers of the design being set into the relavant column cell.
    If anyone could help that would be great...
    Please see: http://picasaweb.google.co.uk/dave.alexander69/Pictures#5244800978549492338
       LOOP AT lt_zdata INTO ls_zdata.
            lv_index = sy-tabix.
    *       set column values
    *       loop at row data and set colour attributes of individual cells
            LOOP AT lt_columns ASSIGNING <fs_column>.
              lr_col_header = <fs_column>-r_column->get_header( ).
              lr_col_header->set_ddic_binding_field( ).
              CREATE OBJECT lr_input_field EXPORTING value_fieldname = <fs_column>-id.
              lr_column = lr_column_settings->get_column( <fs_column>-id ).
    *         for the date columns only...
              IF <fs_column>-id(4) = 'CELL'.
    *           get and set column dates from select option user input
                READ TABLE lt_dates INTO ls_dates INDEX 1.
                IF lt_dates IS INITIAL.
                  lr_col_header->set_text( 'Date' ).
                ELSE.
                  ls_dates-low = ls_dates-low + lv_incr_date.
                  MOVE ls_dates-low+2(2) TO lv_for_col_date+6(2).   "Year
                  MOVE ls_dates-low+4(2) TO lv_for_col_date+3(2).   "Month
                  MOVE ls_dates-low+6(2) TO lv_for_col_date(2).     "Day
                  MOVE lv_for_col_date   TO lv_col_date.
                  lr_col_header->set_text( lv_col_date ).
                  lv_incr_date = lv_incr_date + 7.
                ENDIF.
                LOOP AT lt_orgdata_dates INTO ls_orgdata_dates
                  WHERE crew = ls_zdata-crew
                    AND position = ls_zdata-position
                    AND name = ls_zdata-person
                    AND trip_arr >= ls_dates-low
                    AND trip_dep <= ls_dates-low.
    *             column heading settings
                  lr_field = lr_table->if_salv_wd_field_settings~get_field( <fs_column>-id ).
                  lr_field->if_salv_wd_sort~set_sort_allowed( abap_false ).
    * trying to set cell variants ?@#??!!???
    *              lr_cv = lr_column->set_key( ls_zdata-variance ).
    *              lr_cv->set_editor( lr_input_field ).
    *              lr_cv->set_cell_design( value = '01').
    *              lr_column->add_cell_variant( lr_cv ).
    * current method of seeting the cell colors... (but puts value in cell!)
                  FIELD-SYMBOLS: <fs> TYPE data.
                  lr_column->set_cell_design_fieldname( value = <fs_column>-id ).
                  ASSIGN COMPONENT <fs_column>-id OF STRUCTURE ls_zdata TO <fs>.
                  WRITE: CL_WD_TABLE_COLUMN=>e_cell_design-one TO <fs>.
                  MODIFY lt_zdata FROM ls_zdata. " INDEX lv_index.
                ENDLOOP.
              ENDIF.
    Kind Regards
    Dave Alexander

    Hi check this code to set cell colors for ALV grid.
    Take a context attribute with type WDUI_TABLE_CELL_DESIGN.
    Here i am populating colors based on some condition.Check the loop of the internal table.
    method get_flight_details .
    data:node_flights type ref to if_wd_context_node,
         it_flights type sflight_tab1,
         ls_flights type sflight,
         it_final type   if_componentcontroller=>elements_flights,
         ls_final type   if_componentcontroller=>element_flights.
        select * from sflight into table it_flights
    up to 100 rows.
        node_flights = wd_context->get_child_node( 'FLIGHTS' ).
        loop at it_flights into ls_flights.
           move-corresponding ls_flights to ls_final.
           if ls_final-price = '185.00'.
              ls_final-readonly = abap_true.
              ls_final-celldesign =
    cl_wd_table_column=>e_cell_design-badvalue_light.
           else.
              ls_final-readonly = ' '.
              ls_final-celldesign =
    cl_wd_table_column=>e_cell_design-goodvalue_light.
           endif.
           append ls_final to it_final.
        endloop.
        node_flights->bind_table(
            new_items            = it_final
            set_initial_elements = abap_true
    *        INDEX                = INDEX
    data: l_ref_cmp_usage type ref to if_wd_component_usage.
    l_ref_cmp_usage =   wd_this->wd_cpuse_alv( ).
    if l_ref_cmp_usage->has_active_component( ) is initial.
       l_ref_cmp_usage->create_component( ).
    endif.
    data: l_ref_interfacecontroller type ref to iwci_salv_wd_table .
    l_ref_interfacecontroller =   wd_this->wd_cpifc_alv( ).
       data:
         l_value type ref to cl_salv_wd_config_table.
       l_value = l_ref_interfacecontroller->get_model(
    * Make Price column editable
    data:l_column type ref to cl_salv_wd_column,
          l_column1 type ref to cl_salv_wd_column,
          lr_input type ref to cl_salv_wd_uie_input_field,
          l_input1 type ref to cl_salv_wd_uie_input_field.
    l_column = l_value->if_salv_wd_column_settings~get_column( 'PRICE' ).
    create object lr_input
      exporting
        value_fieldname = 'PRICE'
    l_column->set_cell_editor( value = lr_input ).
    * to make some cells non editable
    lr_input->set_read_only_fieldname( value = 'READONLY' ).
    l_value->if_salv_wd_column_settings~delete_column( id = 'READONLY'   )
    *Set the table Editable
    l_value->if_salv_wd_table_settings~set_read_only( value = abap_false ).
    *Give colors to cells
    l_column1 = l_value->if_salv_wd_column_settings~get_column( 'CARRID' ).
    l_column1->set_cell_design_fieldname( value = 'CELLDESIGN'  ).
    l_value->if_salv_wd_column_settings~delete_column( id = 'CELLDESIGN' )
    endmethod.
    Thanks
    Suman

Maybe you are looking for

  • Can Indesign CS3 be run legally on two machines

    I have Photoshop CS3 and Indesign CS3. Photoshop can be installed on 2 machines (Desktop and laptop for traveling). It does not appear that I can do the same with Indesign (or am I doing something wrong). Thanks in advance, Bob

  • Object ID For Price In Stock Posting

    Hi All, My client needs the object id for the price field in the stock posting screen as he wants to put a check on it in the transaction notification.  Could anybody help me with this please? To get to the screen I am talking about you go to Stock M

  • Pages keeps crashing in mountain lion

    Help! I'm at the end of my rope with pages. I have OS 10.8.2 I am able to open old documents, but whenever I atry to create a new one, it causes the app to crash. I went as far as deleting  everything in my computer from iwork'09 and reinstalling it

  • Error when install NW2004S

    Hello guys, When I install NW2004S on Win2003 SR2 with Oracle 10g and got to  stelp 38 of "Execute Service", there occured a error  as follow: FJS-00003 TypeError : ex  has no properties ( in script NW_Onehost|ind|ind|ind|ind, line138708:???) I have

  • No dialog box appears

    I am using DW8 with Coldfusion trying to add a new recordset in the bindings tab. After selecting the + sign in bindings I am confronted with a dropdown list with the first option being "recordset(query)". When I select that option NO dialog box appe