Tableview - change color in row

Hi all,
I have a tableview in my view and I have to change the color for each second row in the table. For example: 1. row: blue, 2. row: white, 3. row: blue, 4. row: white ...
How can I do this?
Best regards & Thanks in advance!
Alberto

And if you are not planning to use iterators then you can use the design attribute of the tableView itself....
The value will be
<htmlb:tableView id = "tv1"
                     design = "ALTERNATING" />
But this will not work if we use iterators...
Hope this helps.
<b><i>Do reward each useful answer..!</i></b>
Thanks,
Tatvagna.

Similar Messages

  • How to change color of rows count dispalyed while debugging ssis packages

    Hello,
    in visual 2013 ssdt version I have row count displayed in white color on pale background: bit.ly/1oWP1Cm
    I'd like to have it in black. I know it should be changeable in Options -> Fonts and Colors, but what option should I change from myriads available?
    Thank you in advance.

    My colleague had the same issue in that we couldn't see the numbers.  We couldn't figure out why we couldn't see the numbers and the design screen was white.  It looked like the numbers were displaying in white over the connections lines.  So
    we changed the color scheme to light and the numbers appeared in black.  WHen we switched the color scheme back to dark, the canvas turned dark and the text was in white.
    So there must be a bug when selecting the color scheme on the first run of Visual Studio 2013 in that it doesn't set the correct canvas color for the SSIS designer.  Luckily toggling the color scheme resolves the issue.
    Christian Jones Software Developer, former Network/Sys Admin

  • Change color multi-row highlite tabular form

    I would like specific instructions on a quick way to change the highlite color when the multi-row check
    box is chosen on a tabular form.
    Thanks,
    Sabrina

    Sabrina,
    To change the background color of the rows selected using the row selector, edit the report template you’re using, scroll down to row highlighting and type the color you like into the field labeled “Background color for checked row”. You can type in the name of the color or the code.
    Hope this helps,
    Marc

  • Change color of List link

    Hi,
    I'm trying to change the color of the links in one of my Lists. Can somebody please tell me how to do this? I'm not sure where to put it or what the syntax is.
    Thanks,
    Nora

    Take a look at:
    Change color of row links
    Basically, create a class for your links and change the attributes using the :link,:visited,and :hover pseudo-classes. Even better, apply a class to the UL element, such as "myList" then add the following to your css:
    ul.myList li a:link,ul.myList li a:visited{color:#00ff00;text-decoration:none;}
    ul.myList li a:link,ul.myList li a:hover{color:#ff0000;text-decoration:underline;}
    That way you don't have to repeat the 'class=".." ' for every link in your li, thus reducing the size of the page.
    Thanks,
    Tyler

  • How can i change the color of row?

    hi
    I want change my background color of rows.
    for examole first row ,white and next gray and the other rows.
    thanks.

    Hello,
    May be you also select the rownum and use the following example. For more information, please search 'SRW.ATTR' in report help.
    function F_SALFormatTrigger return boolean is
    begin
    if :rownum = 1 then
    srw.attr.mask := SRW.BORDERWIDTH_ATTR +
    SRW.FBCOLOR_ATTR +
    SRW.BBCOLOR_ATTR +
    SRW.BORDPATT_ATTR +
    SRW.FFCOLOR_ATTR +
    SRW.BFCOLOR_ATTR +
    SRW.FILLPATT_ATTR;
    srw.attr.borderwidth := 1;
    srw.attr.fbcolor := 'red';
    srw.attr.bbcolor := 'blue';
    srw.attr.bordpatt := 'checker';
    srw.attr.ffcolor := 'yellow';
    srw.attr.bfcolor := 'green';
    srw.attr.fillpatt := 'crisscross';
    srw.set_attr (0, srw.attr);
    end if;
    RETURN(TRUE);
    end;
    Regards,
    George
    hi
    I want change my background color of rows.
    for examole first row ,white and next gray and the other rows.
    thanks.

  • Change color on a row in list

    Hi,
    I want to change color on my lists rows with buttons (look att the picture) i want to be abel to choose more then 1 item and change the color on all that is marked and i want to do this with javascript :)

    Hi,
    JSLink would be a more recommended way in SharePoint 2013 for your requirement.
    The links below would be helpful for you to get a quick start:
    http://www.rbradbrook.co.uk/blog/2013/04/14/introduction-to-client-side-rendering-in-sharepoint-2013/
    http://www.learningsharepoint.com/2013/04/13/sharepoint-2013-js-link-tutorial/
    http://www.martinhatch.com/2013/08/jslink-and-display-templates-part-5-creating-custom-list-views.html
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Change different background color in row grid

    Hi,
        i want to change different  background color in row grid..ex.two different colors should continue in all row grid..pls guide me ..
    Regards,
    Senthil.

    Hi Senthil,
    If I understand you correctly, you wish to show a grid with alternating colours down the rows.
    You have a few options:
    1) Apply a stylesheet nd display it as HTML.  But this solution lacks the advantages of the iGrid
    2) Return a field with alternating 1's and 0's in the query and use this field in the Colour-Context mapping
    3) Use JavaScript to loop through each row and set alternating background cell colour for all columns
    Hope this helps.
    Cheers,
    Jai.

  • Ow to change the color of row in Datagrid view

    How to change the color of row in Datagridview. Eg. Am getting a remote server services by get-service.  I want to change the color of services that are not running. Am using the below function to get the services.
    Please help me it would be useful
    function Get-SystemInfo
        $array = New-Object System.Collections.ArrayList
    $Script:SystemInfo = Get-WmiObject win32_service -ComputerName $textbox1Computername.text | select DisplayName,Name,state,status,startmode | Sort-Object state,startmode,DisplayName
    $array.AddRange($SystemInfo)
    $datagridview1.DataSource = $array

    Thanks.
    Can you simply my code for Memory usage to Show Computer name, TotalMem,UsedMem,FreeMem, used Mem %, Free Mem %
    Am using the below code :
    $buttonMemory_Click= {
    if($textbox1Computername.text -ne "")
    $script:Object =@()
    $script:array = New-Object System.Collections.ArrayList      
    $Object =@()
    $SystemInfo = Get-WmiObject -Class Win32_OperatingSystem -computername $textbox1Computername.text | Select-Object csname, TotalVisibleMemorySize, FreePhysicalMemory
    $TotalRAM = $SystemInfo.TotalVisibleMemorySize/1MB
    $FreeRAM = $SystemInfo.FreePhysicalMemory/1MB
    $UsedRAM = $TotalRAM - $FreeRAM
    $RAMPercentFree = ($FreeRAM / $TotalRAM) * 100
    $RAMUsedPercent = (100 * $UsedRAM) / $TotalRAM
    $TotalRAM = [Math]::Round($TotalRAM, 2)
    $FreeRAM = [Math]::Round($FreeRAM, 2)
    $UsedRAM = [Math]::Round($UsedRAM, 2)
    $RAMPercentFree = [Math]::Round($RAMPercentFree, 2)
    $RAMUsedPercent = [Math]::Round($RAMUsedPercent, 2)
    $TotalVirtualMemorySize=[Math]::Round($SystemInfo.TotalVirtualMemorySize/1MB, 3)
    $FreeVirtualMemory=[Math]::Round($SystemInfo.FreeVirtualMemory/1MB, 3)
    $FreeSpaceInPagingFiles=[Math]::Round($SystemInfo.FreeSpaceInPagingFiles/1MB, 3)
    $NP=$SystemInfo.NumberofProcesses
    $NU=$SystemInfo.NumberOfUsers
    $Object += New-Object PSObject -Property @{
    #ComputerName = $textbox1Computername.text
    TotalRAMGB = $TotalRAM;
    FreeRAMGB = $FreeRAM;
    UsedRAMGB = $UsedRAM;
    FreeRAMPercentage =$RAMPercentFree;
    UsedRAMPercentage =$RAMUsedPercent;

  • Not able to color different rows with different colors in a column of table

    Hi,
    I am trying to to display different rows with different colors in a column of the table based on some decode condition.
    I have gone through the following threads :
    Can we colour the rows in the column of a table
    Changing Color of a value in a column
    This is what i have done :
    1.Added the following code to custom.xss(changed the name to Custom.xss as suggested in one of the above threads) --- in path ---- jdev\myhtml\OA_HTML\cabo\styles
    <style selector=".1">
    <includeStyle name="DefaultFontFamily"/>
    <property name="font-size">11pt</property>
    <property name="font-weight">Bolder</property>
    <property name="color">#008000</property>
    <property name="text-indent">3px</property>
    </style>
    <style selector=".2">
    <includeStyle name="DefaultFontFamily"/>
    <property name="font-size">11pt</property>
    <property name="font-weight">Bolder</property>
    <property name="color">#FFFF00</property>
    <property name="text-indent">3px</property>
    </style>
    2. Sql query of the VO is :
    select comments,role ,decode(role,'REQUESTER','1','2') Colorattr from xxat_sars_action_history where request_id = :1 and event_name = :2 and action_code <> 'PENDING'
    order by sequence_num desc
    3. Coded the following in the process request of the controller:
    OATableBean table = (OATableBean)webBean.findIndexedChildRecursive("CommentsTB");
    OAMessageStyledTextBean roleBN = (OAMessageStyledTextBean)webBean.findIndexedChildRecursive("role");
    OADataBoundValueViewObject cssjob = new OADataBoundValueViewObject(roleBN,"Colorattr");
    roleBN.setAttributeValue(oracle.cabo.ui.UIConstants.STYLE_CLASS_ATTR, cssjob);
    where 1 and 2 form the colors ( i have even tried with 'Red' and 'Yellow'...as it was not working replaced with 1 and 2)
    4.The query returns data fine with corresponding 1 and 2 values.
    But different colors are not getting reflecting on to the UI.
    I am testing this on my local jdev.
    Please do let me know if i am missing something.
    Thanks ,
    Sushma.

    Any Clues please.....
    Thanks,
    Sushma.

  • How to change color of selected label from list of labels?

    My Problem is that I have a list of labels. RowHeaderRenderer is a row header renderer for Jtable which is rendering list items and (labels).getListTableHeader() is a method to get the list. When we click on the label this code is executed:
    getListTableHeader().addMouseListener(new MouseAdapter()
    public void mouseReleased(MouseEvent e)
    if (e.getClickCount() >= 1)
    int index = getListTableHeader().locationToIndex(e.getPoint());
    try
    if (((ae_AlertEventInfo)theAlerts.values().toArray()[index]).ackRequiredFlag)
    AcknowledgeEvent ackEvent = new AcknowledgeEvent(
    this, (ae_AlertEventInfo)theAlerts.values().toArray()[index]);
    fireAcknowledgeEvent(ackEvent);
    ((HeaderListModel)listModel).setElementAt(ACK, index);
    catch(Exception ex) {;}
    Upon mouse click color of the label should be changed. For some period of time ie. Upto completion of fireAcknowledgeEvent(ackEvent);
    This statement is calling this method:
    public void handleAcknowledgeEvent(final AcknowledgeEvent event)
    boolean ackOk = false;
    int seqId = ((ae_AlertEventInfo)event.getAlertInfo()).sequenceId;
    if (((ae_AlertEventInfo)event.getAlertInfo()).ackRequiredFlag)
    try
    // perform call to inform server about acknowledgement.
    ackOk = serviceAdapter.acknowledge(seqId,
    theLogicalPosition, theUserName);
    catch(AdapterException aex)
    Log.error(getClass(), "handleAcknowledgeEvent()",
    "Error while calling serviceAdapter.acknowledge()", aex);
    ExceptionHandler.handleException(aex);
    else
    // Acknowledge not required...
    ackOk = true;
    //theQueue.buttonAcknowledge.setEnabled(false);
    final AlertEventQueue myQueue = theQueue;
    if (ackOk)
    Object popupObj = null;
    synchronized (mutex)
    if( hasBeenDismissed ) { return; }
    // mark alert event as acknowledged (simply reset ack req flag)
    ae_AlertEventInfo info;
    Iterator i = theAlerts.values().iterator();
    while (i.hasNext())
    info = (ae_AlertEventInfo) i.next();
    if (info.sequenceId == seqId)
    // even if ack wasn't required, doesn't hurt to set it
    // to false again. But it is important to prevent the
    // audible from playing again.
    info.ackRequiredFlag = false;
    info.alreadyPlayed = true;
    // internally uses the vector index so
    // process the queue acknowledge update within
    // the synchronize block.
    final ae_AlertEventInfo myAlertEventInfo = event.getAlertInfo();
    SwingUtilities.invokeLater(new Runnable()
    public void run()
    myQueue.acknowledge(myAlertEventInfo);
    myQueue.updateAcknowledgeButtonState();
    // here we should stop playing sound
    // if it is playing for this alert.
    int seqId1;
    if (theTonePlayer != null)
    seqId1 = theTonePlayer.getSequenceId();
    if (seqId1 == seqId)
    if (! theTonePlayer.isStopped())
    theTonePlayer.stopPlaying();
    theTonePlayer = null;
    // get reference to popup to be dismissed...
    // The dismiss must take place outside of
    // the mutex... otherwise threads potentially
    // hang (user hits "ok" and is waiting for the
    // mutex which is currently held by processing
    // for a "move to summary" transition message.
    // if the "dismiss" call in the transition
    // message were done within the mutex, it might
    // hang on the dispose method because the popup
    // is waiting for the mutex...
    // So call popup.dismiss() outside the mutex
    // in all cases.
    if(event.getSource() instanceof AlertEventPopup)
    popupObj = (AlertEventPopup)event.getSource();
    else
    popupObj = thePopups.get(event.getAlertInfo());
    thePopups.remove(event.getAlertInfo());
    SwingUtilities.invokeLater(new Runnable()
    public void run()
    // search vector elements to determine icon color in main frame
    String color = getColor();
    fireUpdateEvent(new UpdateEvent(this, blinking, color));
    // Call dismiss outside of the mutex.
    if (popupObj !=null)
    if(popupObj instanceof AlertEventPopup)
    ((AlertEventPopup)popupObj).setModal(false);
    ((AlertEventPopup)popupObj).setVisible(false); // xyzzy
    ((AlertEventPopup)popupObj).dismiss();
    else
    // update feedback... ack failed
    SwingUtilities.invokeLater(new Runnable()
    public void run()
    myQueue.setInformationMessage("Acknowledge failed to reach server... try again");
    return;
    Code for RowHeaderRenderer is:
    class RowHeaderRenderer extends JLabel implements ListCellRenderer
    JTable theTable = null;
    ImageIcon image = null;
    RowHeaderRenderer(JTable table)
    image = new ImageIcon(AlertEventQueue.class.getResource("images" + "/" + "alert.gif"));
    theTable = table;
    JTableHeader header = table.getTableHeader();
    setOpaque(true);
    setHorizontalAlignment(LEFT);
    setForeground(header.getForeground());
    setBackground(header.getBackground());
    setFont(header.getFont());
    public Component getListCellRendererComponent( JList list, Object value,
    int index, boolean isSelected, boolean cellHasFocus)
    int level = 0;
    try
    level = Integer.parseInt(value.toString());
    catch(Exception e)
    level = 0;
    if (((ae_AlertEventInfo)theAlerts.values().toArray()[index]).ackRequiredFlag)
    setBorder(UIManager.getBorder("TableHeader.cellBorder"));
    this.setHorizontalAlignment(JLabel.CENTER);
    this.setVerticalAlignment(JLabel.CENTER);
    setIcon(image);
    else
    setBorder(BorderFactory.createLineBorder(Color.gray));
    setText("");
    setIcon(null);
    return this;
    I tried but when i am clicking a particular label, the color of all labels in the List is being changed. So can you please assist me in changing color of only the label that is selected and the color must disappear after completion of Upto completion of fireAcknowledgeEvent(ackEvent);

    im a bit confused with the post so hopefully this will help you, if not then let me know.
    I think the problem is that in your renderer your saying
    setBackground(header.getBackground());which is setting the backgound of the renderer rather than the selected item, please see an example below, I created a very simple program where it adds JLabels to a list and the renderer changes the colour of the selected item, please note the isSelected boolean.
    Object "value" is the currentObject its rendering, obviously you may need to test if its a JLabel before casting it but for this example I kept it simple.
    populating the list
    public void populateList(){
            DefaultListModel model = new DefaultListModel();
            for (int i=0;i<10;i++){
                JLabel newLabel = new JLabel(String.valueOf(i));
                newLabel.setOpaque(true);
                model.addElement(newLabel);           
            this.jListExample.setModel(model);
            this.jListExample.setCellRenderer(new RowHeaderRenderer());
        }the renderer
    class RowHeaderRenderer extends JLabel implements ListCellRenderer
        JTable theTable = null;
        public Component getListCellRendererComponent(JList list, Object value,
                                                      int index, boolean isSelected, boolean cellHasFocus){
            JLabel aLabel = (JLabel)value;
            if (isSelected){
                aLabel.setBackground(Color.RED);
            }else{
                aLabel.setBackground(Color.GRAY);
            return aLabel;       
    }

  • How do I get a field to automatically select a value and change color based on another automatic field?

    Here is the situation:
    I have a row on a form called Finding Risk Rating. In this row are four fields: Probability, Severity, Risk Rating, Color.
    Probability is a drop down menu with the following values: 1, 2, 3, 4, 5
    Severity is a drop down menu with the following values: A, B, C, D, E
    Risk Rating is a field that I have a custom calculation script:
    var riskRating = this.getField("Probability").value+this.getField("Severity").value;
    event.value = riskRating;
    So, when I pick Probability = 1 and Severity = D, Risk Rating will automatically change to 1D, etc. This works fine on the surface as far as I can tell.
    The part where I am stuck, is the fourth field Color.
    Ideally, I want Color to be automatically populated depending on the value of Risk Rating. For example, for 1E I would want it to say "YELLOW" and the field to change color to yellow. For 1A it would be "GREEN" with the color green, etc.
    I tried doing an if else for all cases, but it never refreshes to the correct value. I then checked using app.alert to see what fields riskRating and colorRank are (see code below), and I noticed that riskRating never changes, even though the value in Risk Rating changes. Is there a way to order script(s) so that if I execute one, the other will follow? I'm new to scripting for forms and haven't done any programming in 10+ years, so feel free to rip my code in favor or something more efficient, or direct me to a good resource I can learn from.
    Here's the basis of what I have for scripting on Color. It's brief because I wanted to test it out before writing every 'if else' statement.
    var colorRank;
    var riskRating = this.getField("Risk Rating").value;
    if (riskRating = "1E") colorRank = "YELLOW";
    else if (riskRating = "1A") colorRank = "GREEN";
    else if (riskRating = "5A") colorRank = "RED";
    event.value = colorRank;
    app.alert("colorRank = " + colorRank + ", riskRating = " + riskRating);
    Any help is appreciated. Thanks!

    One problem is if more than one combo box item has the same number associated with it, you cannot simply set the export value to the corresponding number since they need to be unique (or the user interface behaves weird). One thing you can do is set up an object to associate a list item with a value, and look up the value in code when a list item is selected.
    For more information, see: http://acrobatusers.com/tutorials/2007/js_list_combo_livecycle

  • Q10 - I tap the screen to select, the icon changes color (indicating selection) but nothing happens...

    I notice an issue that predominantly happens when I use my thumbs to tap but does happen with fingers from time to time. 
    When I select an icon (say, for instance the lower-right corner icon to jump into camera settings), the icon changes color slightly when my thumb touches the glass, and then when I remove my thumb, nothing happens. 
    Sometimes this happens more than 5 times in a row.  It's one thing if the screen never recognized my finger/thumb in the first place.  It is a bit more madening when I KNOW that there was recognition (icon changing color) and yet nothing happens.. 
    Anyone else having this problem?  Is there some way to recalibrate the screen? 
    Right after I posted this message I tried that camera setting button - 7 tries before anything happened with my right thumb, one try with right index finger, then again it took 5 tries with index finger.  The frustrating thing is that the icon to load the camera in the first place (lower right corner)... that one almost always works with the first tap... 

    Perform a Reset...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430

  • How to change color in table header

    I have a table model like below I can change column colors (background or foreground ) but I couldn't change table headers color in my application . Basicly I want to change color of "Grup Ad&#305;","Ki&#351;i Say&#305;s&#305;" column headers.
    Please help
    thanks
    class MyTableModel extends AbstractTableModel {
    public String[] columnNames = {
    "Grup Ad&#305;","Ki&#351;i Say&#305;s&#305;",
    public int getColumnCount() {
    return columnNames.length;
    public int getRowCount() {
    return data.length;
    public String getColumnName(int col) {
    return columnNames[col];
    public Object getValueAt(int row, int col) {
    return data[row][col];
    public Class getColumnClass(int c) {
    return getValueAt(0, c).getClass();
    public boolean isCellEditable(int row, int col) {
    return true;
    public void setValueAt(Object value, int row, int col) {
    if (DEBUG) {
    System.out.println("Setting value at " + row + "," + col
    + " to " + value
    + " (an instance of "
    + value.getClass() + ")");
    data[row][col] = value;
    fireTableCellUpdated(row, col);
    if (DEBUG) {
    System.out.println("New value of data:");
    printDebugData();
    }

    You have to implement a TableCellRenderer and affect it to your columns with:myTable.getColumnModel().getColumn(0).setHeaderRenderer(myTableCellRenderer);

  • Coloring table row using css in pfr

    Hi all,
    I am using classic table region for loading the records.After loading in PFR using table multiselection selecting one or more than one row then coloring should happen for those selected rows.
    In pfr we cann't change bean properties.
    Give ur idea.
    Thanks,

    Hi,
    Go through these threads...
    Can we colour the rows in the column of a table
    Changing Color of a value in a column
    Thanks,
    Gaurav

  • Change color on condition

    hi i am using oracle 10g forms
    i have tabular block and want to change the color of a row whenever my condition satisfied.
    in post-query i have written some thing like that
    DECLARE
         cur_itm VARCHAR2(80);
          cur_block VARCHAR2(80) := :System.Cursor_Block;
    BEGIN
         cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
         WHILE ( cur_itm IS NOT NULL )
         LOOP
              cur_itm := cur_block||'.'||cur_itm;
              Set_Item_Instance_Property( cur_itm, CURRENT_RECORD, VISUAL_ATTRIBUTE,'YEL');
              cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
         END LOOP;
    END;
    now i want to put a condition that if a particular field in the block is not null then only change the color of rows.
    but dont know how and where to put such condition inside the procedue.
    thanks

    Hi FRNzzz!! wrote:
    hi i am using oracle 10g forms
    i have tabular block and want to change the color of a row whenever my condition satisfied.
    in post-query i have written some thing like that
    DECLARE
         cur_itm VARCHAR2(80);
          cur_block VARCHAR2(80) := :System.Cursor_Block;
    BEGIN
         cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
         WHILE ( cur_itm IS NOT NULL )
         LOOP
              cur_itm := cur_block||'.'||cur_itm;
              Set_Item_Instance_Property( cur_itm, CURRENT_RECORD, VISUAL_ATTRIBUTE,'YEL');
              cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
         END LOOP;
    END;now i want to put a condition that if a particular field in the block is not null then only change the color of rows.
    but dont know how and where to put such condition inside the procedue.
    thanksjust add condition before the Set_Item_Instance_Property. Like
    DECLARE
         cur_itm VARCHAR2(80);
          cur_block VARCHAR2(80) := :System.Cursor_Block;
    BEGIN
         cur_itm := Get_Block_Property( cur_block, FIRST_ITEM );
         WHILE ( cur_itm IS NOT NULL )
         LOOP
              cur_itm := cur_block||'.'||cur_itm;
                   /* ADDED THE IF CONDITION */
                    IF PARTICULAR_FIELD IS NOT NULL THEN
                 Set_Item_Instance_Property( cur_itm, CURRENT_RECORD, VISUAL_ATTRIBUTE,'YEL');
                    END IF;
              cur_itm := Get_Item_Property( cur_itm, NEXTITEM );
         END LOOP;
    END;

Maybe you are looking for