Row color changes

Hi,
I read somewhere a while ago and I don't remember if it was in JSF using datatables but is a property that will allow me to display a table change the background color for each row for example row 1 will be of gray row 2 on white in another words the even row will be white the odd row will be gray
Thanks

JSF<h:dataTable rowClasses="row1, row2" />CSS.row1 {
    background-color: #bbb;
.row2 {
    background-color: #ddd;
}

Similar Messages

  • Report row color change based on condition

    I have follow this forum steps Re: Color Row In Report
    Column Template 1
    <td #ALIGNMENT# class="t1data" style="background-color:#ADD8E6;">#COLUMN_VALUE#</td>
    PL/SQL expression condition
    '#2#' = 'BOOKED'
    Column Template 2
    <td #ALIGNMENT# class="t2data" style="background-color:#FFE87C;">#COLUMN_VALUE#</td>
    PL/SQL expression condition
    '#2#' = 'ENTERED'
    http://img29.imageshack.us/img29/2792/apexcolor.png
    This does color change but for some rows the colors are highlighted wrong and when i mouse over the rows , it changes to wrong color.

    Hi,
    t1Data and t2Data sound like standard theme css class names.
    In my example, the colouring is done by the style attribute on the TD tag. For "normal" rows:
    &lt;td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t18data"&gt;#COLUMN_VALUE#&lt;/td&gt;for highlighted rows:
    &lt;td #ALIGNMENT# headers="#COLUMN_HEADER#" class="t18data" style="background-color:red;"&gt;#COLUMN_VALUE#&lt;/td&gt;Have you defined "t1Data" and "t2Data" in STYLE tags on your page?
    Andy

  • Table Row Color change on Edit.

    Hi,
    I have a editable table with two columns (one is inputtextbox and other is an LOV). On click of edit button, table will allow user to change the data.
    My requirement is, when ever user edits the data, I need to change the column content color.
    I tried to set the color on valuechangelistener of each component but failed.
    Please let me know whether it is possible to achieve.
    Thanks.

    Any help...

  • Change JTable's row color on row selection

    Hello!
    Everywhere I've looked they're only explaining how to draw rows in different colors WHEN THE TABLE IS BEING CREATED, via prepareRenderer.
    But that is not what I am looking for. What I want is to actually change the row's color after the table has been drawn/rendered/whatsoever. For instance, when the user clicks on that row. The default behaviour is for the row to become blueish, but, when the user selects another row, the first selected row turns back to white. I would like to prevent that from happening. I want the row to become FIRE RED when the user clicks on it, and I want the row to remain like that for good, even when the user selects a different row. Do I make any sense here? :-)
    Thank you for your time and future suggestions.

    Everywhere I've lookedApparently you didn't look in the Swing forum, because thats where Swing related questions should be posted.
    but how do I assign a cell renderer to an entire row/table ?The easiest way is to use the prepareRenderer(...) method you have already found. My "TablePrepareRenderer" class (which you can find by searching the Swing forum) shows you how to do this.
    You will note that the color of the row is determined by data in the table. So all you need to do is add another column in the TableModel that contains the information you need to determine the row color. That column can be removed from view in the table by removing the TableColumn from the TableColumnModel.

  • UIX - Changing read-only-table row colors

    Hi
    I have the requirement to alternate the background-row-color in an UIX read-only-table dependent on a value in the row.
    Can anybody point me in the right direction of a solution please?
    I'm familiar enough with the styles in the XSS style sheets, and using EL to dynamically change attributes of a UIX web page when rendered. However in the default <table> UIX tag generated by JDeveloper when dragging a data control onto a UIX web page, there doesn't appear to be a <row> tag for changing the background colour?
    Any help appreciated
    I'm using JDeveloper 9.0.5.2.
    Cheers,
    CM.

    I don't know if this works in JDeveloper 9.0.5.2, but there's a solution at least for JDevloper 10.1.2. You have to define a different styleClass (a CSS) for each column, depending on a condition. This solutions works as well together with row banding:
    <column>
      <columnHeader>
        <sortableHeader model="${ctrl:createSortableHeaderModel(bindings.MyView,'Seats')}" text="Seats"/>
      </columnHeader>
      <contents>
        <rowLayout width="100%" styleClass="${ui:cond(uix.current.IsLocked == 'J', 'OraTableCellLocked', '')}">
          <contents>
            <cellFormat>
              <contents>
                <textInput model="${ui:defaulting(uix.current.Seats, ' ')}" columns="10" readOnly="true"/>
              </contents>
            </cellFormat>
          </contents>
        </rowLayout>
      </contents>
    </column>The styleClass "OraTableCellLocked" has to be defined in the file "base-desktop.xss". An example ("Locked" cells are displayed with a red background):
       <style selector=".OraTableCellLocked">
        <includeStyle name="TableCellDataText"/>
        <includeStyle name="TableCellDataVerticalAlign"/>
        <!--<includeStyle name="TableCellDataBackgroundColor"/>-->
        <includeStyle name="TableCellDataBorderColor"/>
        <property name="background-color">#FFA4A4</property>
      </style>Hope this helps, although the original is very old.
    Regards,
    Georg

  • Change  row color on alv

    hi
    how can i change row color on alv.

    Hi
    thanks your answer  Uday Gubbala         
    i was examinated this link  [https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/abapWebDynproALV-ChangeCellColourbasedonContent]
    but i don't  do   this row  wd_this->m_alv_model = lo_value. error message : m_alv_model unknow.
    and this sample change column color but i want to row
    Thanks.

  • Re: Is it possible to change row colors on array fields ors

    HI Martin!
    Yes, it is possible to change row colors on array fields.
    I have attached a PEX (tools.pex) which has an object which changes FillColor
    and PenColor for Arrays. The PEX has it's own test window, so you can try
    various combinations. (There are a few other Objects in the Project which are
    not relevant
    I'm not sure that you can change colors on individual choices in a scroll list.
    I haven't tried playing around with it.
    The test window actually changes the color of scroll lists as well.
    The object keeps track of which rows have changed color, same with pen color, so
    that when you scroll it keeps track of which rows are a different colors.
    The pex is self-contained, just import the file and do a test run.
    Please let me know if you have any problems.
    -later
    -labeaux
    Is it possible to change row colors on array fields or scroll lists?
    I need to create a list field that will allow me to dynamically change the
    fillColor and/or penColor attributes of individual rows. (I just want to
    highlight the rows, and those seem to be the obvious attributes...) It appears
    you can't do that on scroll lists (the elements are list elements, and don't
    have those attributes) and I can't figure out how to do it on an array field
    either. Any ideas for how to accomplish this?
    -Martin ([email protected])

    FreshWebmuse,
    Version 2 of iCal has the "Group Calendar" feature. It was released as part of Mac OS X v10.4, and if you really want/need that feature you will have to upgrade to Tiger.
    ;~)

  • Changing row color when ever will select that row.

    Hello,
    After applying themes which property do i need to to change so that the color of the row will change from from dark yellow to some light color when ever i select that perticular record
    in table UI Element.
    Thanks & Regards
       Kiran

    Hello Kiran,
    In theme editor go to Complex Elements -> Tables -> Side Heading Selected Cells -> Background color of Primary selection.
    Hope this helps.
    Cheers-
    Pramod
    award points if helpful.

  • Changing Row color when ever I select perticular row

    Hello,
    After applying themes which property do i need to to change so that the color of the row will change from from dark yellow to some light color when ever i select that perticular record
    in table UI Element.
    Thanks & Regards
       Kiran

    Hi Kiran,
          After setting the theme, you will have to change the following property in theme editor.
    Complex Elements -> Tables -> Selected Cells.
    a) Background Color of Primary Selection
    b) Background Color of Secondary Selection
        I hope this helps.
    Regards,
    Uday.

  • Dynamically changing row color in an ADF table?

    Hi,
    I am using Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. Can anyone please let me know the code for dynamically changing the row color of an ADF table?
    Thanks,
    Vik

    well you can use EL on af:column inlineStyle property to change the color on condition
    e.g
    inlineStyle='#{(row.SelectedRow)?"background-color: Silver":""};a example can be found here it is changing color based on Checkbox selection http://baigsorcl.blogspot.com/2010/06/deleting-multi-selected-rows-from-adf.html

  • Report rows persistent color change

    Greetings all,
    I created a report and setup conditions so that rows will be either RED for Overdue, Yellow for within a week of being overdue and Green for all good. What is happening is when I run the report it shows the colors perfectly. If I run my mouse over them rows they change back to grey and I have to refresh the page to get them to show up again. Is there a way to make the colors persistent? So when the report is run and a row is red, it stays red and does not change again until the page is required and the criteria changes.
    Thanks in advance. I don't have it on apex.oracle.com but if necessary I can put a mock up on the site.
    thanks
    Wally

    If I run my mouse over them rows they change back to grey and I have to refresh the page to get them to show up again. Is there a way to make the colors persistent? This is due to row highlighting settings in the report template. To eliminate this:
    <li>Create a copy of the report template used for the report
    <li>Remove the <tt>#HIGHLIGHT_ROW#</tt> substitution string from the Before Each Row template
    <li>Delete the Background color for checked/current row values from the Row Highlighting template
    <li>Set the report to use the copied report template

  • Changing row color through a drop down box????

    Is there a way I can get a table row to change color based on the value of a drop down box? I have 3 color options in the drop down list: yellow, green, red. I'm trying to get it so when I select a color in the list (like for example green) the whole row of that table fills with green. I'm searching for an answer and I can't find it. Any help would be greatly appreciated Thanks :)

    Check the code very carfully, you appear to have left off a number of quotes:
    // force to white in case there is no match following
    Page1.Shape.LeaveType.border.fill.color.value = "0,0,0";
    //changes row to red
    if(LeaveType.rawValue == 4) {
    Page1.Shape.LeaveType.border.fill.color.value = "255,0,0";
    //change row to Green
    if(LeaveType.rawValue == 3) {
    Page1.Shape.LeaveType.border.fill.color.value = "0,128,0";
    //change row to Blue
    if(LeaveType.rawValue==2) {
    Page1.Shape.LeaveType.border.fill.color.value = "0,0,255";
    //keep row white
    if(LeaveType.rawValue == 1) {
    Page1.Shape.LeaveType.border.fill.color.value = "0,0,0";
    Or you could use the "swithc(){}" statement:
    var FillColor = "0,0,0"; // white
    switch(LeaveType.rawValue) {
    case 4:
    FillColor = "255,0,0"; // red
    break;
    case 3:
    FillColor = "0,128,0"; // green
    break;
    case 2:
    FillColor = "0,0,255"; // blue
    break;
    case 1:
    break;
    default:
    app.alert("Unkown Leave Type: " + LeaveType.rawValue, 1, 1); // identify unkown leave type
    break;
    Page1.Shape.LeaveType.border.fill.color.value = FillColor;
    You might want to also open Acrobat and check the Debugging Conosole for errors.

  • Changing JTable Row Color OnMouseOver

    Hello everybody,
    is it possible to change JTable Row Color when Mouse passes over it ??
    THanks!

    Yes...
    You have to override the table cell renderer and set the color of the rows based on flag.
    The flag can be turned on/off in a mouse motion listener of the table.

  • Change the row colors based on column values in MOSS 2007.

    Hi Team,
    I am using MOSS 2007 environment. In that I am having one SharePoint list. In that list based on column values rows colors need to change.
    Kindly help me anyone on this.
    Thanks,
    Ashok

    Hi Ashok,
    Please follow the below link:
    http://www.contentmaster.com/sharepoint-2010/conditional-formatting-of-list-views-for-sharepoint-2010-changing-the-font-colour/
    http://sharepoint.stackexchange.com/questions/7478/highlight-row-color-based-on-field-values-in-sharepoint-2010-list-view
    Best Regards,
    Brij K

  • Row color hover changes.

    <td #ALIGNMENT# style="background-color:blue">#COLUMN_VALUE#</td>
    '#2#' = 'BOOKED'
    <td #ALIGNMENT# style="background-color:yellow;">#COLUMN_VALUE#</td>
    '#2#' = 'ENTERED'
    when i mouse over the blue rows( in BOOKED status ), the row color is getting changed to yellow. this is supposed to stay blue. how do i stop this, i don't want to confuse the user.
    I tried to set color value & empty space values for "Row highlighting" in template . it did not helped me.

    Vikas, thanks for your prompt reply...
    Just to explain:
    The Main page (let it be nr 0) is called "Task List" - Here I have a report with all available tasks (one for each row). The report only shows some info plus TASK_TITLE...
    Now I have another 2 pages:
    1. "Edit/Create Task" - that's the page I want to go to when clicking on an Edit button
    2. "View Task" - thats where I want to go to when clicking anywhere on the row.
    The idea is that my current page (0 - "Task List") doesn't display a very large column called TASK_DESCRIPTION. When you view or edit a given task you should get a separate page which also displayes TASK_DESCRIPTION.. This is actually an html page. I hope that clarifies what my app is doing here...
    I tried to view your example:
    See http://htmldb.oracle.com/pls/otn/f?p=24317:203
    but I keep getting the following error:
    ORA-01722: invalid number
    Error ERR-1003 Error executing computation query.
    OK
    Anyway, things look better now but there is still a minor (I hope) issue... This is what I have:
    My 'Task List' report is like this:
    | TASK_ID | TASK_TITLE | TASK_DURATION | ... | ... | ... etc.
    In my report attributes I did:
    <input type="hidden" value="#TASK_ID#" />#TASK_TITLE#
    Now, when I click anywhere on the line I do get the popup screen with TASK_ID but I ALSO get that when clicking on the Edit button (TASK_ID) column. Even though I get redirected correctly afterwards...
    This means that if I change the script so that instead of a popup screen I will create a link, upon hitting the Edit Button (under TASK_ID) it will first process the "whole_row" script directing me to "View TASK" page instaed of "Edit/Modify" page.
    How can I make sure that (let's stick to your example) the popup screen will appear on hitting anywhere on the row EXCEPT the edit column?
    Just noticed: When you add the hidden input field - the highliht of words for search stops working... :(
    Regards,
    Pawel.
    Message was edited by:
    padmocho

Maybe you are looking for