Color of single table cell

Hi,
I have created a Web Dynpro table. Now I want to set the color of a single cell depending on its value and the row number.
Is it possible? Are there any examples or tutorials for CE 7.11?
Thanks ahead,
Bernd

Ok,
situation is as follows:
Context:
--> Table1 (table data source)
attr1
attr2
attr3
attr4
In wdDoModifyView (the relevant things - short form):
table = (IWDTable) view.createElement(IWDTable.class, "Table1");
WDNodeInfo table_node = wdContext.getChildNode("Table1",0).getNodeInfo();               
table.bindDataSource(table_node);
editor = (IWDTextView) view.createElement(IWDTextView.class, editor_id);               
column = (IWDTableColumn) view.createElement(IWDTableColumn.class, column_id);
column.setTableCellEditor(editor);
table.addGroupedColumn(column);
Now I want to set the TableCellDesign of a single cell depending on its value.
Regards, Bernd

Similar Messages

  • Color transparency in table cells

    Hi;
    Is there any way to adjust the opacity of the background
    color of a table
    cell ?
    Thanks;
    Pat

    Thanks Murray. I'll give it a try.
    Pat
    "Murray *ACE*" <[email protected]> wrote
    in message
    news:fb44ib$6r1$[email protected]..
    > No - not background color. But you can make a PNG image
    with adjusted
    > opacity and use that image as a cell background - be
    aware that unadjusted
    > IE6 and earlier doesn't support PNG transparency. A
    google search will
    > reveal workarounds for you, though.
    >
    > --
    > Murray --- ICQ 71997575
    > Adobe Community Expert
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    >
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    > ==================
    >
    >
    > "Pat Jones" <[email protected]> wrote in
    message
    > news:fb447e$6cf$[email protected]..
    >> Hi;
    >>
    >> Is there any way to adjust the opacity of the
    background color of a table
    >> cell ?
    >>
    >> Thanks;
    >>
    >> Pat
    >>
    >
    >

  • Coloring of selected table cells: Ideas wanted

    Hi there,
    for a WD ABAP component to be re-used in various scenarios my customer seek the most comfortable and fency way to color table cells which have been selected first.
    I am almost sure that there is no UI Control in ABAP WD which allows the selction of cells in a grid, pane, table whatever, right?
    Most suitable would be if the cell itself can be selected and then some image within is beeing displayed or even a background color is set.
    I looked into placing a button and image in UI Pane or table/ALV cells but not 100% statisfied with it.
    Is there a better way in order to "simulate" the described requirement?
    As always, the best idea will get the point
    Regards
    Carsten

    Thanks for the tips. Both helped very much.
    I implemented the simple  Table UI because which was sufficient for us but the ALV example is very useful also.
    But related to this I have another question:
    My first the coding didn't work because my Table UI already had a (static) value assigned to it's design property.
    In this case, although I have assigned a dynamic WD_UI_CELL_DESIGN context attribute to the cellDesign property of it didn't show the color.
    Only after the Table design property was set to 'standard' the cell displayed the color.
    Does anyone know what the reason for this is?
    In my opinion any design value applied to the cellDesign property should overrie the inherited table design property. My release already is NW 7.01 so it not seems to be fixed via EhP.
    Regards
    Carsten

  • Setting a CellEditor on a single table cell

    I am trying to get a combo box of choices to display for single cell of a JTable. I currently implemented a 2 column table that contains a key in the first column and a value in the second column. What I want to do is set the second column for a particular "key" to use a combo box to display a list of choices. Is this possible??

    You can set the editor for a specific column, but if you want to set it for one specific cell, you probably have to subclass JTable and override getCellEditor(int, int).

  • Pages (5.2.2): Split a single Table Cell

    Hi everyone,
    Is there anyway to split a single Cell in an existing Table?
    Thanks for your help,
    Prusten,

    …and you win!
    Peter

  • Multiple rows in a single table cell - Adobe forms

    Dear All
    I am developing an adobe form which conatins a table alongwith other screen/ form elements.
    This table is bound to a data node and contains only two columns. Number of rows will be determined at run time.
    Each cell of the table will contain three rows seperated by a space in between them. Please refer to the diagram below for more understanding.
    Yes
    ABC
    No
    PQR
    Not Known
    XYZ
    I have no idea how to achieve this.  Can anyone help?
    Regards
    Vineet Vikram

    Hi,
    Here are the steps how you can do it.
    1. Create a table.
    2. In the Library palette, click the Standard category and drag the Table object into a cell in the main table.
    Note: If you selected Donu2019t Show This Again in the Insert Table dialog box, when you select the Table object from the Library palette, LiveCycle Designer automatically inserts a table with the same number of columns and rows that you inserted the last time you used the Insert Table dialog box.
    3. In the Insert Table dialog box, enter the number of columns and rows. You can enter a maximum of 20 columns and 50 rows. You can add more columns and rows after the table is created by using the Insert commands on the Table menu.
    4. To add a header row, select Include Header Row In Table.
    5. To add a footer row, select the Include Footer Row In Table.
    6. Click OK.
    Regards
    Runal

  • Adding a single table cell

    In other spreadsheet programs I have been able to add a single cell to a column without having to copy and pste the entire column. Is there a way to do this in Numbers?

    We can do that … if we use one of my scripts
    http://discussions.apple.com/thread.jspa?messageID=6415242
    or, go to my idisk:
    <http://idisk.me.com/koenigyvan-Public?view=web>
    then download:
    foriWork:for_Numbers:move_one_cell_down_orright.zip
    foriWork:for_Numbers:move_one_cell_up_orleft.zip
    Yvan KOENIG (from FRANCE samedi 23 août 2008 13:10:41)

  • Coloring text in table cells depending on what text appears

    I have a table where some entries say 'success' and others say 'failure.' I want the 'success' to appear in green and the 'failure' to appear in red.
    This code doesn't work:
            model = new JTTableModel();
            JTable resultsTable = new JTable(model);
            resultsTable.setDefaultRenderer(Object.class,
                    new ColorRenderer());
        public class ColorRenderer extends JLabel implements TableCellRenderer {
            public java.awt.Component getTableCellRendererComponent(JTable table, Object value,
                    boolean isSelected, boolean hasFocus,
                    int row, int column) {
                System.out.println("value " +value+ " class of value "+value.getClass().getName());
                if (value.equals("success")){
                    setForeground(new Color(0,255,0));
                }else if (value.equals("failed")){
                    setForeground(new Color(255,0,0));
                return this;
        }What am I doing wrong?

    But lmgtfy is rude, No it isn't. Most posters are too lazy to search for themselves. There are hundreds of examples of renderers to be found in the forums here. Many times is it faster for us to point to links that have the answser rather then spend time explaining everything you have done wrong. You are not the only person we help.Then why not post the link to the Google search directly? No, lmgtfy is not about simply posting a link, it's about posting a link in a way that says, 'You're too stupid to use Google, so I'll do it for you.' Which is rude. No Duke points, sorry.
    As for searching this forum, the quality of search results here is definitely poor. How many screens of results should I search to find an example of what I need? Maybe I'm spoiled by Google, or maybe they should open this forum to Google search, and make the wisdom here accumulated more available.
    but if you note the time this was posted,We have no idea where you live or what time of day it is for you.Yes you do, if I set the time zone on my profile.
    This is my last post on this thread. I'm not going to bicker with you.

  • Theme Editor: where to change backgroundcolor of editable table cells?

    Hi all,
    I need to change the color of an editable table cell.
    I navigated to the theme editor --> tables.There is a section "Editable Tables". The preview shows an example with three columns and tree rows. I want to change the backgroundcolor of the cell in the first row, third column (in SAP standard it is lightgrey).
    The backgroundcolor of the rows beneath can be changed in section "Selected Cells", the backgroundcolor of the first two columns in the first row can be changed by "Background Color of Standard Table Cell" but I can't find the field where I can change the color of the last cell.
    Best regards,
    Sandra

    Hi,
    The blue color come from your definitions on "Labels and Fields" to read-only color of input field.
    Regards,
    F.F

  • 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

  • Table cell selection border

    hi,
    how can you find out the default color of the table cell renderer border?
    when you select a cell in a JTable, there's (by default) a thin border drawn around it. since i use my own renderer for some columns, i need to find out the color of this border (it is differnt for different look & feels).
    thanksout the default

    you were right. thank you.
    just one more thing: where can i find the names of all those properties that the UIManager uses? like the one you used "Table.focusCellHighlightBorder"...

  • Table cell is longer than 176 cm in smartforms

    Hi all,
    While printing the smart form  output it is giving
    error : single table cell is longer than 176 cm
    I found the problem , one of the table field is getting more records
    Those records are not fitting in the screen  , what I will do?
    I referred note #690836 in this I found this solution ..
    u201Cif the text is really longer than 176 centimeters, it cannot be output in a table row. In this case, you must switch to a normal text output in a loop before outputting the table.u201D
    How can I switch to normal text output ,can any one give clear idea  about this
    Inside main table i find one loop condition which is printing more data..

    the problem is the length is so huge it will probably not fit on a single page...
    anyway the smarter way to solve it would be to split the contents of your field into another internal table and put the records of this internal table in different rows of your table
    I guess your field is of string type, then you can use function module SO_STRING_TO_TAB to get your contents into SOLI format then it will be easier to output it

  • Semi-transparent table cell

    I know that table cells can be filled with a color or not have a fill (in which case they are transparent. However, is it possible to have a semi-transparent color in a table cell. I'm not referring to a tint, but a color that you can see through to objects that are underneath it.

    Hi Jay,
    The only way I can think of is by cheating, you could put a transparent rectangle shape into the actual cell, make sure you set the cell insets to 0 though. However if you want text in the cell as well this text will be transparent.

  • Inserting multiple checkboxes into a table cell

    Hi all, new to Livecycle so I could use a little advice.
    I'm trying to insert multiple checkboxes into a single table cell, but as far as I can tell that seems impossible as one checkbox fills the entire cell. Now how do I go about splitting the table cell into 2 rows so that I can insert both of the checkboxes?
    I've also got to add a button to create new rows for the table on click so I don't know if that will factor into the answer.
    |        Header               |           Header2             |           Header3           |
    |                                  |                                      |__________________|
    |                                  |                                      |                                    |
    I hope this crappy ascii drawing comes out right, but that's what I need to happen.
    Thanks!

    Hi Chris,
    I think this should give you what you need: Working with a Multiple Select List Item
    --Jennifer                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to highlight the table cell color in respective colors as needed per the requirements??

    var aData = [
        {notificationNo: "10000000", description: "Maintenance for boiler", location: "G001-STG-UTLR-BLR", equipmentNo: "100000053", orderStatus: "ordered"},
        {notificationNo: "10000010", description: "Genreal Maintenance for boiler", location: "G001-STG-UTLR-BLR", equipmentNo: "100000053", orderStatus: "notordered"},
        {notificationNo: "10000011", description: "boiler Maintenance", location: "G001-STG-UTLR-BLR", equipmentNo: "100000053", orderStatus: "ordered"},
        {notificationNo: "10000012", description: "Pump breakdown", location: "G001-STG-UTLR-BLR", equipmentNo: "100000053", orderStatus: "ordered"},
        {notificationNo: "10000013", description: "External service boiler", location: "G001-STG-UTLR-BLR", equipmentNo: "100000053", orderStatus: "notordered"},
    jQuery.sap.require("sap.ui.model.json.JSONModel");
    var oEnterpriseAsset_NotificationConsole;
    sap.ui.model.json.JSONModel.extend("EAM_Notification_Console", {
        CreateNotificationConsole:function(){
            oEnterpriseAsset_NotificationConsole = this;
                var oTable = new sap.ui.table.Table({
                //title: "Table Example",
                visibleRowCount: 7,
                firstVisibleRow: 3,
                selectionMode: sap.ui.table.SelectionMode.Single,
            /*    toolbar: new sap.ui.commons.Toolbar({items: [
                    new sap.ui.commons.Button({text: "Button in the Toolbar", press: function() { alert("Button pressed!"); }})
                extension: [
                    new sap.ui.commons.Button({text: "Button in the Extension Area", press: function() { alert("Button pressed!"); }})
            }).addStyleClass("tableform");;
            oTable.addColumn(new sap.ui.table.Column({
            label: new sap.ui.commons.Label({text: "Notification"}),
            template: new sap.ui.commons.Link().bindProperty("text", "notificationNo").bindProperty("href", "href",
                    function(aValue)
            //    sortProperty: "notificationNo",
                //filterProperty: "notificationNo",
                width: "200px"
            oTable.addColumn(new sap.ui.table.Column({
                label: new sap.ui.commons.Label({text: "Description"}),
                template: new sap.ui.commons.Link().bindProperty("text", "description").bindProperty("href", "href"),
                //sortProperty: "notificationNo",
                //filterProperty: "notificationNo",
                //width: "200px"
            var oModel = new sap.ui.model.json.JSONModel();
            oModel.setData({modelData: aData});
            oTable.setModel(oModel);
            oTable.bindRows("/modelData");
        var idForTable= "DimTable"
            //alert("id of tbale " + idForTable);
            var htmlOutput = '<table id=' + idForTable + ' name="DimTab" style="border: 1px solid black;margin-left:15px;" cellpadding=6 cellspacing=0><tr style="background-color:#E5E5E5"><td><b>Dimension</b></td><td><b>Value</b></td></tr>';
            for(var i=0;i<aData.length;i++)
             alert(aData[i].notificationNo);
            htmlOutput += '<tr style="display:none;"><td style="border-right:1px solid #e5e5e5;">Contract No</td><td>'+ aData[i].notificationNo+'</td></tr>';
            htmlOutput += '<tr style="display:none;"><td  style="border-right:1px solid #e5e5e5;">Unit No</td><td>'+ aData[i].description+'</td></tr>';
            htmlOutput += '</table>';   
             var html2 = new sap.ui.core.HTML({
                 // static content
                 //content : "<div style='position:relative;background-color:white;'>Weather</div><script src='//www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/builtin_weather.xml&synd=open&w=320&h=200&title=__MSG_weather_title__&lang=en&country=ALL&border=http%3A%2F%2Fwww.gmodules.com%2Fig%2Fimages%2F&output=js'></script>",
            content : htmlOutput,
                  //2 wrkng sydney content : '<div id="cont_Mzc0NjN8NXwxfDF8NHxlZGY1ZjV8M3xGRkZGRkZ8Y3wx"><div id="spa_Mzc0NjN8NXwxfDF8NHxlZGY1ZjV8M3xGRkZGRkZ8Y3wx"><a id="a_Mzc0NjN8NXwxfDF8NHxlZGY1ZjV8M3xGRkZGRkZ8Y3wx" href="http://www.weather-wherever.co.uk/australia/sydney_v37463/" target="_blank" style="color:#333;text-decoration:none;">Weather forecast</a> © weather</div><script type="text/javascript" src="http://widget.weather-wherever.co.uk/js/Mzc0NjN8NXwxfDF8NHxlZGY1ZjV8M3xGRkZGRkZ8Y3wx"></script></div>',
                  //content : '<div style="margin-left:-10px;margin-top:10px;width:100%;"><LINK rel="StyleSheet" href="http://weatherandtime.net/new_wid/w_5/style.css" type="text/css" media="screen"><div class="ww_5" id="ww_5_2119"><div class="l_b"></div><div class="c_b"><div class="day" id="d_0"><span class="den"></span><br><span class="date"></span><br><span class="temp"></span><div class="pict"></div><span class="press"></span><br><span class="hum"></span><br><span class="vet"></span><br></div><div class="day" id="d_1"><span class="den"></span><br><span class="date"></span><br><span class="temp"></span><div class="pict"></div><span class="press"></span><br><span class="hum"></span><br><span class="vet"></span><br></div><div class="day" id="d_2"><span class="den"></span><br><span class="date"></span><br><span class="temp"></span><div class="pict"></div><span class="press"></span><br><span class="hum"></span><br><span class="vet"></span><br></div><div class="cl"></div><div class="links"><a target="_blank" title="Pune Weather forecast" href="http://weatherandtime.net/en/Asia/India/Pune-weather.html">Pune Weather forecast</a><br><a style="font-size:12px !important;color:#12A0D7 !important;text-decoration:none !important;" href="http://weatherandtime.net/en/widgets-gallery.html" title="weather"></a></div></div><div class="r_b"></div></div><script type="text/javascript" src="http://weatherandtime.net/w_5.js?city=2119&lang=en&type=2&day=3"></script></div>',
              // initially behaves the same as Sample 1
                 preferDOM : false,
                 // use the afterRendering event for 2 purposes
        return     oTable;
    /* In the screen shot as u can see.. I have to highlight the table cell in green color and red color for ordered and unordered status(which is binded to a json data) respectively....anyone please help??

    Hi Abhi,
                   Check this link it may helpHow I made highlight of specific values in Table

Maybe you are looking for