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.

Similar Messages

  • How to set background color of row in JTable

    Hi,I want to set different background color to rows in JTable according to some value in the this row.
    eg.
    no name isGood
    1 aaa yes (this row's background color is red)
    2 bbb no (this row's background color is blue)
    3 ccc yes (this row's background color is red)
    4 ddd yes (this row's background color is red)
    5 eee no (this row's background color is blue)
    thanks

    thanks!*_*                                                                                                                                                                                                                                                       

  • Changing the background color of the row of the selected cell in table view

    How can I change the background color of the table row when user clicks on table cell in table view?
    Edited by: a_brar on May 5, 2012 11:12 PM

    You could apply the following css style (by defining a custom stylsheet with the following lines and loading it into your app).
    The last color sets the background color of the selected row while the table-view has focus (in this case to orange).
    .table-view:focused .table-row-cell:filled:focused:selected {
        -fx-background-color: -fx-focus-color, -fx-cell-focus-inner-border, orange;
    }There are quite a lot of subtleties in the css styling for the tableview (e.g. different colors for the selected row when the control has focus vs when it doesn't or when the user hovers over a selected row in an unfocussed tableview), which you may want to cater for when chaning the background color of the selected row in a table view. There is also alternate styling for when the tableview is in row selection vs cell selection mode. So you may want to look at customizing further based on the css styles in caspian.css in sdk/rt/lib/jfxrt.jar if you can understand the complex css there.

  • How to change the background color of a single row

    Hi OTN,
    I am using JDeveloper 11.1.1.2 with ADF faces in view layer.My issue is How to change the background color of a single row in af:table ?.

    How to highlight ADF table row based on column value?
    Found by searching

  • 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.

  • How can I change the background color of odd/even rows in a panelCollection

    Hi everyone.
    I'm using a panelCollection and I need to change the backgroung color for odd/even rows in the table,
    how can I do this, using a stylesheet, is there a special selector or property for this?
    globalResultCollection (UIPanelCollection object) , is a collection of UITable elements, and it's working fine.
    I just want to change the defaul background color for rows.
    Thanks
    <af:panelCollection id="GLOBAL_RESULT_COLLECTION"
    binding="#{admin.view.globalResultCollection}"
    styleClass="globalResultCollectionRegion"
    clientComponent="true">
    <f:facet name="menus">
    <af:menu id="GLOBAL_OPERATION_MENU"
    binding="#{admin.view.globalOperationMenu}" />
    </f:facet>
    <f:facet name="toolbar">
    <af:toolbar inlineStyle="width:100%"
    binding="#{admin.view.globalOperationToolbar}"
    id="OPERATION_TOOLBAR"/>
    </f:facet>
    </af:panelCollection>

    Hi,
    use this:
    af|table::data-row af|column::data-cell { background-color: #CCCCFF; }
    af|table::data-row af|column::banded-data-cell { background-color: #FFCCCC; }
    Regards,
    s o v i e t

  • How to change background color of row of a table in a panel table

    hi! im trouble right now, somebody help me. i have a matrix of row and column, panel row and panel table in jsp. my problem is how can i change the background color of a row once it clicked. i have row in table which have panel table with panel column and panel row.
    i have already work for it but i only change the background color once i clicked is the first row and first column then the rest row and column is not working..pls.. give me sample code for it..thnx a lot!!!
    Thnank's,
    froilet

    Ok! I have 2 jsp, the input jsp and display.jsp! Once i input value on input.jsp, it will display on display.jsp. I have also my javascript named updateBin.js. Now, how can i update each row once i clicked it... the succeeding rows and columns..hope u help me with this..here is my code:
    Display.jsp
    <html:html locale="true">
    <head>
         <html:base/><meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Strip Map Loader</title><script type="text/javascript" src="js/updateBin.js"></script>
    </head>
         <%      
              int intRow = Integer.parseInt(request.getParameter("intRows"));
              int intColumn = Integer.parseInt(request.getParameter("intColumns"));
              int intPanelRow = Integer.parseInt(request.getParameter("intPanelRows"));
              int intPanelColumn = Integer.parseInt(request.getParameter("intPanelColumns"));
         %>
    <BODY bgcolor="#33b9ec" leftmargin="50%">
         <b>Strip ID:  </b><font color="red" face="arial"><b><bean:write name="strStripID" scope="request" /></b></font>
         <br><br>
         <font size="3" face="tahoma"><b>Bins Updater Tool:</b></font>
         <table border="1" width="365px" bgcolor="#1ea6f7" height="15">
              <tr>
                   <td valign="top" align="center">
                        <table><tr><td><font size="2">Select Bin Type:</font></td>
                        <td><select id="binType" onchange="updateBin()" size="1">
                             <OPTION></OPTION>
                             <OPTION value="green">Good Bin</OPTION>
                             <OPTION value="red">Reject Bin</OPTION>
                        </select></td></tr></table>
                   </td>
    </tr>
    </table>
    <table id="tbl" align="center" border="1" cellspacing="3" cellpadding="5" bgcolor="#CC9900">
    <tr>
    <td>                                                  
         <%for (int pnlrows=1; pnlrows<=intPanelRow; pnlrows++){%>     
              <table id="table" width="100%" border="1" bgcolor="#CC9900" cellspacing="7" cellpadding="0" align="center">
              <tr>
              <%for(int pnlcols=0; pnlcols<intPanelColumn;pnlcols++){%>               
              <td>
                        <%for (int rows=1;rows<=intRow; rows++){%>                    
                        <table cellspacing="5" width="100px" align="center" bgcolor="#CC9900">
                        <tr>
                             <td>                    
                             <%for(int cols=1; cols<intColumn; cols++){%>
                             </td>     
                             <td id="col" bgcolor="#008000" align="center" ondblclick="changeCol()"> X </td>          
                             <%}%>
                             <td id="row" bgcolor="#008000" align="center" ondblclick="changeRow()"> X </td>
                             <td></td>     
                             <%}%>                                                  
                        </tr>
                        </table>
              <%}%>
              </td>
              </tr>
              </table>     
         <%}%>
    </td>
    </tr>
    </table>
    and this is my javascript code:
         function updateBin()
              var binType=document.getElementById("binType")
              if(binType.value == "green")
              [binType.selectedIndex].value
              //binType = changeR();
              //alert('Good Bin Selected');
              if(binType.value == "red")
              [binType.selectedIndex].value
              //binType = changeC();
              //alert('Reject Bin Selected');
              if(binType.value == "")
                   alert('Please select only on the category!')
         function changeRow()
              if(binType.value=="green")
              x=document.getElementById('row').style.background="green";     
              alert('Updated!')     
              if(binType.value=="red")
              x=document.getElementById('row').style.background="red";
              //alert('Reject Bin Updated!')
         function changeCol()
              if(binType.value=="green")
                   x=document.getElementById('col').style.background="green";     
                   alert('Updated!')     
              if(binType.value=="red")
              x=document.getElementById('col').style.background="red";
              //alert('Reject Bin Updated!')
    this code only updates the first row and column..but the succeeding panel row and panel column can't update...what will i do? theres something wrong in my javascript or in my jsp...pls help me......thanx.....in advance!!

  • Change the background color of selected row in adf table

    Hi,
    Can somebody guide me in changing the background color of a row when its being selected. In my ADF table, one of the column is of type Command Link. So whenever i click this command link on any particular row that complete row color should change as an indication of that row being selected.
    Please guide me to do this. I referred to other forum posts, but they couldnt meet my need.
    Thanks
    ri

    Hi Frank,
    you're right. This should work. But the result is not perfect from my point of view.
    I use
    <af:table ...>
      <af:column ...>
        <af:outputText value="#{row.col1}" inlineStyle="#{row.mystyle}"/>
      </af:column>
    </af:table>and I get e.g. this in HTML:
    <table ...>
      <tr>
        <td class="af_column_cell-text OraTableBorder1111"><span style="font-weight:bold;">qqq</span></td>
      </tr>
    </table>while I would prefer to get somethig like this:
    <table ...>
      <tr>
        <td style="font-weight:bold;"><span>qqq</span></td>
      </tr>
    </table>, which looks much smarter. Is it possible?
    Thanks,
    Alexandre.

  • Rows with different background color in array

    I am displaying an array indicator. When certain values are found in a row of the array, I would like the row to have a different background color so that it stands out on the front panel. Can this be done? Especially, can this be done using property nodes dynamically?
    Thank you

    Hi jmaarek,
    I don't think you can do this with arrays as all the elements have the same properties.
    You can do this with a table though. Use the 'Active Cell' property (set the row to -2 to select the entire row) and the 'CellBGColor' property.
    Hope this helps.

  • How do you change the background color of certain rows in a Datagrid?

    How do you change the background color of certain rows in a
    Datagrid?

    Hee is a great example:
    http://www.cflex.net/showfiledetails.cfm?ChannelID=1&Object=File&objectID=487
    Tracy

  • Change the background color in a report cell - td bgcolor

    Hi.
    I have a report in which I would like to change the background color of a table cell based on some values in the underlying query
    If Column A > Column B and Column C > 10, I want to color the background green. In my cgi , this was easy, but in apex, even if I write the query to output html, won't everything already be wrapped in the <td></td> tags? Is there any way around this?
    Thanks

    Mike ,
    With the above solution you can conditionally fill the report cell with a particular color and not the entire row set. If you want to highlight entire row, you have to do something different. Take a look at this jQuery function
    Step 1 . Download jquery http://code.jquery.com/jquery-1.4.2.min.js
    Step 2. Upload it to apex image folder using shared component.
    Step 3. In the page header put the following code
    <script src="#WORKSPACE_IMAGES#jquery-1.4.js" type="text/javascript" ></script>
    <script type="text/javascript">
    $(document).ready(function(){
         if ($('.apexir_WORKSHEET_DATA').length > 0) {
              function HighLightRows(){
                                       $("table.apexir_WORKSHEET_DATA tbody td:has(COLOR_GRAY)").siblings().addClass('greentd');
                                       $("table.apexir_WORKSHEET_DATA tbody td:has(COLOR_GRAY)").addClass('greentd');
                                       $("table.apexir_WORKSHEET_DATA tbody td:has(COLOR_GREEN)").siblings().addClass('graytd');
                                       $("table.apexir_WORKSHEET_DATA tbody td:has(COLOR_GREEN)").addClass('graytd');
         // This time out is required since after the report is refreshed via AJAX,
                                  setTimeout(function(){HighLightRows();},1000);
         }//if
    HighLightRows();
    </script>
    <style type="text/css">
    .apexir_WORKSHEET_DATA td.greentd
    background-color: green !important;
    .apexir_WORKSHEET_DATA td.graytd
    background-color: gray !important;
    </style>
    Step 4. Change the SQL Query to
    SELECT
         SALE_DATE
         ,PRODUCT_NAME
         ,PRODUCT_ID
         , CASE WHEN SALE_DATE > ADD_MONTHS(SYSDATE,-2) THEN
                     '<COLOR_GREEN>&#38;nbsp;</COLOR_GREEN>'
              ELSE
                      '<COLOR_GRAY>&#38;nbsp;</COLOR_GRAY>'
         PRODUCT_NAME_COLOR
    FROM SALES;
    Step 5. Make this new column PRODUCT_NAME_COLOR visible and in the column heading u can just put &#38;nbsp;.
    As long as this column will be available for display you will see the conditional highlighting.Thanks,
    Manish

  • How to change the background color of a sequence?

    I'm using Premiere Pro CS5 on Win7 x64.  I've imported a JPEG that's a different size than my 1920 x 1080 frame.  The background of this JPEG is white, but the background of the sequence is black (by default), so the borders of the JPEG make it stand out.  I want the JPEG to blend into the sequence background by making the sequence background white.  How can I change the sequence background color?  Thanks.

    Jim and Ann are correct. I can see where someone used to After Effects might ask that question though because in AE you can change the background color of the composition. Same with Photoshop.
    However, I think it would confuse things if changing the background color were to be allowed in Premiere Pro. Black tells me something. I suppose white could tell me the same thing, but at this time it is not possible in Premiere Pro.

  • How to change the background color of a cell based on other cell background

    Hi,
    Sorry if this is a basic question - I am new to XML. I want to create a table column, with no data in it. I then want to change the background color of the column based on the background color of other columns. I.E.
    - If there are 3 or less cells in this row that are not green, color this cell green.
    - If there are 4 or less cells in this row that are not green, and 3 or less are not red, color this cell yellow.
    - If there are 4 or less cells in this row that are not green, and 3 or more are red, color this cell red.
    If there are 5 or more cells in this row that are not green, color this cell red.
    Many thanks for any assistance.

    Okay - I have this resolved.
    1. Create two variables (Yellow and Red):
    <?xdoxslt:set_variable($_XDOCTX, 'Yellow', 0)?>
    <?xdoxslt:set_variable($_XDOCTX, 'Red', 0)
    2. For each cell, set the background based on their individual traffic light criteria, and update the associated color variable by 1. By default the backgrd color is set to Yellow so I only have to check for the lower and upper bounds:
    <?choose:?>
    <?when:number(CHECKED_IN)<=1?>
    <?attribute@incontext:background-color;'Lime'?>
    <?end when?>
    <?when:number(CHECKED_IN)>3?>
    <?attribute@incontext:background-color;'Red'?>
    <?xdoxslt:set_variable($_XDOCTX, 'Red', xdoxslt:get_variable($_XDOCTX, 'Red') +1)?>
    <?end when?>
    <?otherwise?>
    <?xdoxslt:set_variable($_XDOCTX, 'Yellow', xdoxslt:get_variable($_XDOCTX, 'Yellow') +1 )?>
    <?end otherwise?>
    <?end choose
    3. I now want a cell that is Red if any of the cells in the row is red. Its yellow of there are 3 or more yellow cells in the row, and no reds. Otherwise its green. First, create an empty cell and make the default color green. Then add:
    <?if: number(xdoxslt:get_variable($_XDOCTX,'Red')) > 0?>
    <?attribute@incontext:background-color;'Red'?>
    <?end if?>
    <?if: number(xdoxslt:get_variable($_XDOCTX,'Yellow')) >= 3 and number(xdoxslt:get_variable($_XDOCTX,'Red')) = 0?>
    <?attribute@incontext:background-color;'Yellow'?>
    <?end if?>
    4. Finally, reset the variables for the next row:
    <?xdoxslt:set_variable($_XDOCTX, 'Yellow', 0)?>
    <?xdoxslt:set_variable($_XDOCTX, 'Red', 0)

  • How can I change the background color in the inbox?

    The background color in my inbox (well, all mailboxes) is white. A yellow background would make the existing black text a lot easier to read. How can I change the background color in the inbox?

    Themes work in Thunderbird - duggabe was not refering to Firefox.
    Another useful addon is theme and font changer:
    * https://addons.mozilla.org/fr/thunderbird/addon/theme-font-size-changer/
    However, Thunderbird allows you to modify all sorts of things.
    Make hidden files and folders visible:
    * http://kb.mozillazine.org/Show_hidden_files_and_folders
    Help > Troubleshooting Information
    Click on 'show Folder' button
    a window opens shwoing profile folder name
    Close Thunderbird now - this is important
    In the profile name folder, Create a new folder called '''chrome''' - note the spelling
    It should be in the same place as the 'Mail' folder.
    see first image below.
    Open Notepad
    Can be located : Start > Programs > accessories
    Copy everything shown between the lines below.
    Paste into Notepad.
    Save as '''userChrome.css''' - note the spelling (edit updated - this was a typo error)
    This should be saved in the '''chrome''' folder.
    see second image below.
    Restart Thunderbird.
    I have chosen a yellow for you
    <pre>
    #f6f58c = a yellow....it is a hex code for a colour.
    </pre>
    You can change it if required. Remember when updating anything in the profile folders, you must close Thunderbird first.
    More info on colours.
    * http://www.yourhtmlsource.com/stylesheets/namedcolours.html
    <pre>
    * Do not remove the @namespace line -- it's required for correct functioning
    @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
    /*Background colour for message list*/
    #threadTree > treechildren::-moz-tree-row {
    background-color: #f6f58c !important;
    </pre>
    -------------------------------------------

  • Why can't I change the background color of my UIView in IB?

    I have a rootController which controls several other ***ViewController's and I have been doing the usual thing by changing the background color in IB.  However, for one controller, I cannot change it's background color from the default no matter what I do.
    To be clear, each new controller created has been done in the same manner using the UIViewController subclass with nib file.
    I have cleaned the project and deleted the app from my iPhone countless times and still no change.
    Any suggestions will be greatly appreciated.
    Thanks!

    @ KT
    I'm replying to myself because I cannot see your post ??????
    From my email- KT said:
    "Typically, when a same-only different controller acts up like this, the first thing to do is to rewire - sounds like you've gone down that path tho.
    Can you duplicate one of the cooperative controllers, add it to the mix and see if things change there?"
    I've tried all of that several times.  I have no idea.  Maybe some sleep will help it and me.
    Thanks for your comments and suggestions.
    Edit
    As soon as I posted this - your post appeared.  Again??????

Maybe you are looking for