To highlight rows in a table...

Hi,
I have read the threads regarding coloring of cells or rows and columns in a table by adding a "decode" Vo attribute and then creating CSS classes and binding the column Bean with the CSS class..
But in devguide , RowFormatting is given..
What about that????
How to highlight or change color of all columns of selected rows in a Table..
I tried to follow the steps given in devguide for Row Formatting but it is not correct....
Can anybody tell me what to do to change color of the rows (All Columns).....
Thanks
Saurabh

One might wanna check the coding. You have to pay attention when there's only 1 element in the table.
          // set the lead selection away for the marking to take effect
          if (wdContext.nodeCustomerWithTxt().size() > 1){
               if (leadSelection > 0){
                    int leadSelectionChange = leadSelection -1;
                    wdContext.nodeCustomerWithTxt().setLeadSelection(leadSelectionChange);          
               } else { // leadSelection == 0
                    int leadSelectionChange = leadSelection +1;
                    wdContext.nodeCustomerWithTxt().setLeadSelection(leadSelectionChange);          
So long, Johannes

Similar Messages

  • How to highlight a row in tree table - jdev 11.1.2

    Hello:
    Given a key, I want to highlight (select/set currency) the corresponding row in a tree table. I thought the following code would highlight the row in the tree table that corresponds to the key, but nothing is highlighted in the tree table. ie---> treeTable.setSelectedRowKeys(selectedRowKeys); What am I doing wrong? Thanks much.
    public String cb1_action() {
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("Next");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    return null;
    DCBindingContainer bc = (DCBindingContainer) getBindings();
    DCIteratorBinding iter = (DCIteratorBinding) bc.findIteratorBinding("DDF1Iterator");
    RowKeySet selectedRowKeys = new RowKeySetImpl();
    ArrayList list = new ArrayList();
    Row r = iter.getCurrentRow();
    Key k = r.getKey();
    list.add(k);
    selectedRowKeys.add(list);
    treeTable.setSelectedRowKeys(selectedRowKeys);
    AdfFacesContext adfc = AdfFacesContext.getCurrentInstance();
    adfc.addPartialTarget(treeTable);
    }

    Hello:
    Do you mean setting the selectedRowKeys in the setter method of the treeTable in the Request Scoped Managed Bean?
    If that is what you mean, I tried that and there was no change in behavior. (Still does not highlight the correct row in the tree table upon execution of the next method for the bindings) Does anyone have any sample code they can provide that works?
    Thanks for the help.

  • How to highlight the first row of a table

    When entering the form, how do I get the first row of the table to be highlighted when it has not been selected yet? There is already data in the table. Thanks.
    Allyson

    Any ideas on what would cause this NOT to work? I added this row right after the table is created and populated and it is still not highlighted when I enter the form. The snippet of code that does this is:
    MyTableModel modelS = (MyTableModel)dataModel.get("S");
    jTable1 = new JTable(modelS);
    jTable1.setRowSelectionInterval(0,0);MyTableModel is this:
    class MyTableModel extends DefaultTableModel {
      public MyTableModel(Object[] columnNames, int numRows) {
        super(columnNames, numRows);
      public boolean isCellEditable(int row, int column) {
        if (TableKey == 'S') {
          if (column == 6) {
            return false;
        if (TableKey == 'O') {
          if (column == 0 || column == 4 || column == 5) {
            return false;
        if (TableKey == 'P') {
          return false;
      return true;
    }Can anyone help? Thanks.
    Allyson

  • Keeping Row Highlighted In Master-Detail Table

    JDev 11.1.2.0
    I have a small .jsf page with a master-detail setup, using 2 tables.
    When I select a row in the master table, the detail table is populated as expected.
    When I select a row in the detail table, the row is no longer highlighted on the master table.
    Is there any way to have the row selection in the master table remain highlighted while the user is clicking around the detail table?
    I am not sure if it matters but I have manually added filtering to both tables.
    Thank you.
    Ray

    Any help would be appreciated.

  • Highlight Rows and particular columns in table

    Hi,
    My requirement is that I should highlight n (can be any integer value) rows of a table and in each of these rows there are m (1,2,3 or 4 depending on the conditions) columns (All drop downs) that need to be highlighted.
    What I did is as follows:
    1. Made the table multi select and highlighted the rows by using
         wdContext.nodeTable().setSelected(n,true);
       This allowed me to highlight the row.
    2. To highlight the column, I used :
        wdContext.nodeTable().getTableElementAt(n).
        setHdesign(WDTableCellDesign.GOODVALUE_MEDIUM);
    This allows me to highlight the column .
    The problem I am facing is that when both these lines of code are  executed one after the other, the row is shown as selected but this selection overrides the color of the column. The column is then shown in the same color as the rest of the row.
    Can someone suggest a way in which I can both highlight the row and also have the required column(s) of this row in an entirely different color.
    i am using NWDS Version: 7.02.06
    Thanks,
    Himanshu
    Edited by: Himanshu K on Aug 10, 2011 12:23 PM

    Closin as the requirement has changed

  • Select and highlight a default row in a table

    Hi everybody.
    When using a table in WD, the first line is selected and highlighted by default.
    I'd like to reproduce the same behaviour but this time, the selected and highlighted row shouldn't be the first row but any other one that has to be defined previously.
    How could I do that??
    Thanks for any suggestions you may have.
    Regards,
    C.

    For example I have a node SFLIGHT which am using to display data in tabular format on my layout. I have attached a supply function POPULATE_DATA to my context node SFLIGHT to fetch & populate the node.
    METHOD populate_data .
      DATA: lt_sflight TYPE wd_this->elements_sflight.
      SELECT carrid
             connid
             fldate
             price FROM sflight INTO TABLE lt_sflight.
      node->bind_table( new_items = lt_sflight ).
    ENDMETHOD.
    And within my WDDOINIT method am programmatically setting the LeadSelection to the 3rd row as how shown below:
    METHOD wddoinit .
      DATA: wd_node TYPE REF TO if_wd_context_node.
      wd_node = wd_context->get_child_node( name = 'SFLIGHT' ).
      wd_node->set_lead_selection_index( '3' ).
    ENDMETHOD.
    Regards,
    Uday

  • Highlighting one row in a table control

    Hi All,
    Can i highlight one row in a table control. I found some stroke color in the properties for a field in table control. But i am not sure, will it be applied to the entire column or to a particular field.
    Anybody aware of this.?
    Regards,
    Manjunatha.T.S

    Hi,
    This is not currently available in VC.
    Lior

  • Creation of new Row in Tree Table

    We are creating a new row using CreateListener which is written in Bean, after creating the row, we are adding it to the iterator and the new row is not getting highlighted and focus is not in new row in the table by default. It takes an click to make it editable. 'setActiveRowKey()' method didnot help here which is used in the af:table component to achieve the same.
    Any pointers regarding this issue would be helpful..
    Thanks,
    Shruthi

    Hi Max:
    According to what you described, it's really wierd. An ADF table is Surrounded by a panelCollection or not doesn't matter in terms of CreateInsert operations, I think. Also each step you said OK doesn't mean that step is 100% problem free towards your final goal. For example, when you drag and drop and ADF table onto a JSF page, you forget to turn on 'row selection', it will be OK, you won't get any error message, but later on when you find that you need to turn it back on, you have to go back to JSF page source, to manually added codes to do so.
    The simpliest solution and quickest one is to reinitiate a clean ADF project and do it all over again. It's simple straightforward in my view. Probably don't use PanelCollection first, just drop your ADF table on a form, or af:panelForm, but make sure your table and 'CreateInsert' button is surrounded by a form, otherwise, when you click on 'CreateInsert', nothing will happen. When everything works, then probably back it up and replace your form or af:panelForm with panelCollection. See how it goes.
    Thanks,
    Alex

  • Classic report - Highlight row

    APEX 4.2.1
    With all the latest and greatest dynamic action and jQuery goodness in 4.2.1, what is the easiest, declarative way to highlight rows in a classic report region (Generic Column Template) based on data condition using values on the row, using #COL# notation? e.g. If SAL > 1000 and DEPT = Marketing, highlight row in red or some such.
    In prior versions, this involved copying the Generic Column Template to one used just by this report and use the (up to 4) Column Templates with a PL/SQL expression.
    Thanks

    Custom report templates are okay if your needs are straightforward. But you said it already, there are only four different flavors to chose from.
    Here is a solution that'll work on all pages if once installed and can be extended to a multitude of visual attributes. Only an example that you may want to adapt to your liking.
    Edit Page, "CSS, Inline", or via Shared Components > CSS files
    td.color1 {background-color:#9F9} /* Table cell gets colored in light green  */
    td.color2 {background-color:#FF9} /* Table cell gets colored in light yellow */
    td.color3 {background-color:#F99} /* Table cell gets colored in light red    */
    /** and so forth, followed by as many declarations as you need... */Page Template, "Function and Global Variable Declaration":
    /** Change the visual appearance of your classic report as you like after it's rendered */
    function customClassicReportDisplay(){
      /** Transfer the color class from the text to the table cell */
      $('td span.color1').closest('td').addClass('color1');
      $('td span.color2').closest('td').addClass('color2');
      $('td span.color3').closest('td').addClass('color3');
      // and so forth, followed by as many declarations as you need...
    }This jQuery code can be simplified, especially the handling of many lines for many colors can still be compacted, which makes it more difficult to understand though.
    Page Template, "Execute when Page Loads":
    /** Perform the function on Page Load */
    customClassicReportDisplay();
    /** Perform the function after Partial Page Rendering */
    $('form').bind('apexafterrefresh', function(){
      customClassicReportDisplay();
    });Here comes the trick. In the SQL statement, you wrap a <span> HTML tag with a different class declaration around each value that you want to color.
    SELECT '<span class="color' || case when some_value > 100 then '2' else null end || '">' || some_value       || '</span>' AS some_value
         , '<span class="color' || decode(some_other_value, 'too much', '3', NULL)   || '">' || some_other_value || '</span>' AS some_other_value
         , '<span class="color' || case when last_value between  0 and  10 then '1'
                                        when last_value between 11 and  50 then '2'
                                        when last_value between 51 and 100 then '3'
                                        else null end                                || '">' || last_value       || '</span>' AS last_value
      FROM ...This obviously makes the SQL a bit more complicated but in my opinion, I think this is a data driven topic and therefore just fine. Hence you say "depending on value ranges I want to change something" - and that belongs to SQL. WHAT you want to do (here: change color) is then up to your JS and CSS declaration. If you shift the SQL code into a view it's better to maintain and won't get spoiled by non-savvy third party developers...
    I know that's not what you originally asked for, because there is no #COL# notation, but for me it's the most flexible solution I can think of under APEX.

  • How do I change the background color of a row in a table indicator?

    Hello,
      How do I change the background color of a row in a table indicator? I know how to change the background color in a active cell, but that is not what I want. My first intent is to make the background color of the first row a unique color, such as green, just to highlight the top row of the table.
    Regards,
    Kaspar
    Regards,
    Kaspar

    I have done this before by using a for loop to change the active cell of a row in order to give the appearance that the whole row is turning the color at once.
    CLA, CLED, CTD,CPI, LabVIEW Champion
    Platinum Alliance Partner
    Senior Engineer
    Using LV 2013, 2012
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.

  • To color a specific row in a Table UI element

    Hello Experts,
    We have a requirement to highlight (with distinguish color) a specific row of a table UI based on column data.
    Suppose we have a table with 5 column and 10 row, now if the data on 5th column greater than some XYZ value then we need to highlight the specific row with a different color.
    Can anyone please help me to achieve this requirement?
    Thanks & Regards,
    Sambaran Chakraborty

    Hi,
    In your outline, I am missing quite a few prerequisites which I mentioned (not sure if you have implemented them already)
    your sub node, does it have singleton=false, cardinality 1..1 and selection cardinality 1..1?
    The attribute of type TableCellDesign in that sub node, does it have the calculated property to true?
    If you've bound each table column's cellDesign property to this calculated attribute, you just put some code in the generated generated get<SubNode><CalcAttribute> method to set the color
    For instance by just entering the line
    return WDTableCellDesign.CRITICALVALUE_LIGHT
    in that method will render each linked cell to that color
    Not sure what else I can say to explain this, there's not much to code...

  • How to insert a row in Tree table which is dragged from the table?

    Hi All,
    I am having a Tree table and a Table in the same page, like below
    Treetable                                         Table
    Item1                                              Subitem12
         Subitem1                                   Subitem13
         Subitem2                                   Subitem14
         Subitem3                                   Subitem15
         Subitem4                                   Subitem16
    Item2                                              Subitem17
         Subitem5                                   Subitem18
         Subitem6                                   Subitem19
         Subitem7                                   Subitem20
         Subitem8                                   Subitem21
    Item3
         Subitem9
         Subitem10
         Subitem11
    The requirement is i need to "drag" a row from the Table and place it under any parent node in the Tree table.
    What i have done is I make the Tree table as ".ui-sortable" and table as a "draggable".
    I am not able to find the position of the dragged item when i dropped it in the Treetable.
    Please provide me a solution.
    Regards,
    Aravindh

    Hello:
    Do you mean setting the selectedRowKeys in the setter method of the treeTable in the Request Scoped Managed Bean?
    If that is what you mean, I tried that and there was no change in behavior. (Still does not highlight the correct row in the tree table upon execution of the next method for the bindings) Does anyone have any sample code they can provide that works?
    Thanks for the help.

  • Dynamic Select of Row in a table in webdynpro Abap

    Hi,
      I have an requirement, I have an table  and a button, I need to select a row in a table based on button action.
    For example : in a table i have 3 rows. I am submiting a value in a button, I want to see that row highlighted for the value I am sending through button.
    Please let us know the code how to implement this.
    Thanks

    Hi,
    First you have to go to table and set its property "SELECTION MODE" to single or multi lead depending on ur need.
    Then in the ACTION of the button you can use the following code to get the values in the selected row.
    DATA:
         node to get table node for finding no. of rows
            lo_nd_one  TYPE REF TO if_wd_context_node,
         Get selected row for finding no. of rows
       it_table               TYPE        wdr_context_element_set,
         workarea to get selected row
            wa_table                LIKE LINE OF           it_table,
    To get the Selected line item into an internal table
      CALL METHOD lo_nd_one->get_selected_elements
        RECEIVING
          set = it_table.    " data in internal format
      IF it_table[] IS NOT INITIAL.
      type conversion for work area
        READ TABLE it_table INTO wa_table INDEX 1.
    if a row is present
        IF  sy-subrc IS INITIAL.
        Get the values of each attribute
          CALL METHOD wa_table->get_static_attributes
            IMPORTING
              static_attributes = wa_final.       "<Selected data in work area.>  ---> this will have your data
        ENDIF.
    Here wa_final is the work area which is of your table fields type.
    This wa_final will have the selected row.

  • Insert row into database table via dynamic form -

    I have developed a portlet via Portal. I used a dynamic page. I replaced the default "<ORACLE>select * from scott.emp</ORACLE>" text to call a package procedure that uses HTP.P to render the web page. My goal is to show all rows in a table and allow edits to any row, and also add a checkbox on each row to allow the user to mark for delete. I am successfully using a FOR loop and showing all of the data in a grid. My problem - How do I update and delete the data? I have a submit button with nothing behind it currently. I would ideally like to use pl/sql code to do the updates and/or deletes as marked on the page by the user, but I'm not sure how to hook the submit button to calling a procedure to execute the updates/deletes.
    Any help would be appreciated -
    Thanks -
    Kent

    Hi Patrick - Thanks for your response! I have browsed your page quickly - very informative and I will look in more detail. My form design looks as below (using a simple example with emp id and emp name columns) - perhaps this will have to change, but I wanted the user to be able to insert using html fields id_add and name_add, then update (or mark for deletion) any of the existing rows (they are rendered with for loop in pl/sql - eg, id_1/name_1, id_2/name_2, etc for each row in the table). I was hoping the submit action would call a pl/sql that would look at all rows, and then act if an update or delete were required. This makes it difficult to use parms, I believe - I may be able to change the design to show an "update row" below the current "insert row" so that, as in your example, when the user highlights a row, it populates in the update area where changes can be made, and an update button used to effect the changes to a single row at a time.
    Thanks again, I appreciate your input!
    Kent
    ______________ _________________ <insert_button>
    Emp Id (textbox) Emp Name (textbox) Del_Checkbox
    ______________ _________________ ___ <SUBMIT_BUTTON>
    ------------------------- ----------------------------- ------

  • Best way to update individual rows of a Table?

    I've taken a look at some examples, though haven't gotten any clarification on this.  I am looking to have something close to a listbox or table to where I can update just a single column of row values at a 1 time per second pace.  I am looking to display our data-acquisition values in a table or listbox.  The single listbox seemed to work good for this, but I was unable to use row headers to list the channel names next to the channel values.  I was thinking about connecting the cursor values of two list-boxes to do this, but didn't find any info on this for the single list-box.
    I have a few questions:
    1) I have a 1D array to where I want to use that array of data to constantly update the first column (with a multitude of rows) of a table.  I am looking for the best route so as not to take up too much processing time in doing this.
    What is the best way to update individual rows of a table?   Invoke Node "Set Cell Value" ... or is there another method?
    2) Why is it that after every other iteration the row values are erased? 
    Also, for adding additional strings to the original arrray ... is it best to use the "Array Subset" and then the "Build Array" function, or the "Array Subset" and "Insert Into Array" function?
    See the attached example.
    Thanks.
    Solved!
    Go to Solution.
    Attachments:
    Table Example.vi ‏19 KB

    Jeff·Þ·Bohrer wrote:
    2) Why is it that after every other iteration the row values are erased?
    Classic race condition.  dump the for loop and p-node and just wire the 2D array to the table terminal.!
    I'm not seeing the race condition.  What I am seeing is the table emptying after the last element was written to it on every other run.  I saw watched this with highlight execution on.
    But I'm in full agreement with just writing to the terminal.  It is a 1D array, so you will need to use a build array and transpose 2D array in order for it to write properly.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for

  • FrameMaker 8 Track Changes - Customize?

    Oh, I was so excited when FrameMaker 8 came out with track changes feature. and oh, was I disappointed when I got a trial copy and found out that I cannot find a way to customize the way those changes are displayed. It appears that deletions and inse

  • AT300 Jelly Bean - No Users option in settings?

    Hi All, I was hoping with the new Jelly Bean update we could use User Profiles in Android but I don't see the "Users" option in settings which is where it should be. Anyone else having the same issues? or have a solution? Thanks

  • Can I install Adobe InDesign CS5 on a Power Mac G5 running OS 10.5.8?

    Can I install Adobe InDesign CS5 on a Power Mac G5 running OS 10.5.8?

  • Global button icons

    I want to have a global button which allows the user to print any page. The event handler for the button will use the <showFacet> event handler element. I'd like to have a 'printer' icon but couldn't find one in the icon repository on the BLAF websit

  • Plz exp me

    1.exp on board the general flow of data in your land scape? 2.how to you monitor an idoc from xi ? 3.file name is generated statically or dynamically? 4.what are the diff beetween keyfield name and value in file adapter? 5