Blue-white colored table rows
Hi, table design gurus!
I need in blue-white colored table rows. It looks like Table desing in altenating mode. Alternating mode fits my needs except one. This mode restricts read-only tables but I have regular table with editable cells. Well, I have read an article about how to build colorful tables. Ok, I have got a table in a different colors. But neither blue or white color were not found in WDTableCellDesign. How to use blue and white colors for table row background? I should not ovveride CSS using WD Theme Editor. I want to set a color implicitly in java code. Please, help me.
Any help would be apprecited.
Hi Alexey,
I have never used it, but there is a property called semanticColor in the TextView of the columns of the table.
Go to the layout of the view. Look in the Outline. There you will find Table -> TableColumn -> Caption + TextView. In the properties of the TextView you will find in the semanticColor.
The semanticColor needs to be linked to an element inside the table in the context. So create a node inside the table with cardinality 1..1 and selection 1..1 and add a (calculated) attribute to the node with the correct type (I don't know this one....it is probably inside "com.sap.ide.webdynpro.uielementdefinitions". My guess would be com.sap.ide.webdynpro.uielementdefinitions.TableCellDesign.
Ones you have linked the cell to the attribute in the node you will have to code the changes in color doing something like this. that will probably be easiest if the attribute is of the calculated kind
In the calculated attibute you return WDTableCellDesign.GOODVALUE_LIGHT or whatever color you want.
Hope this helps a bit,
Jeschael
Similar Messages
-
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 -
Rows n cols of tables added in activex-MS Word doc border in white color-i need black
Dear members, I developed a program which after acquiring data generates a Word Document containing many tables of data. The sad things is , the rows and columns of the table have white color border as a result of which the table doesnt look like a table.
For ex: presently output is as below (Consider the grey border below as white - the way I get in my prog. ) :
Voltage
Observed value
V1
15.15 V
I need the borders to be black.... What command should I use.. In the table control settings I have tried all but in vain..
PLEASE HELP !
Regards ,Archiethe answer shall take time..have patience..
-
How to color specific row in a table....
Hi all,
I created a table out of an Array[]. The table is successfully filled up by array's elements. Each element is a row.
I want to be able to color specific row; instead of every row. How do I do that?
I was looking rendering to color a row or a string; but not successfull.
Thank you for your time and assistence.My favorite way of doing this is to use CSS. You plan on giving the row you want colored an id attribute, then provide a style like this:
<style type="text/css">
tr#colorMe td {
background-color:blue;
</style>Then, when you want to color the row, you make the HTML output like this:
<table ...>
<tr> //normal row
<td></td><td></td><td></td>
</tr>
<tr id="colorMe"> //colored row
<td></td><td></td><td></td>
</tr>
<tr> //normal row
<td></td><td></td><td></td>
</tr>
</table> -
BSP-i want in white color font of the letters inside the table .
Hi friends'
I have a blue color background in my bsp screen .
I used table for output display.
All are fine .
Default the data in table display black color .
But i want in white color font of the letters inside the table .
MoosaHi,
Try this.
<table border=1>
<tr> <td>Material No</td>
<td>Discription</td>
</tr>
<% loop at XFINAL into wa_prod. %>
<tr>
<td style="color: #FFFFFF;"> <%= wa_prod-matnrt %> </td>
<td style="color: #FFFFFF;"> <%= wa_prod-maktx %> </td>
</tr>
<% endloop. %>
</td></tr>
</table>
Appreciate if helpful.
Regards,
Abhinav -
Color table cells depending on value of entry in row (UI5 & JSON)
Hello all,
I've stuck here a bit. There have been some discussions about how to color the cells of a table that has been bound to a JSON data model. I found some answers how to color individual cells (http://http://scn.sap.com/thread/3383698), but I have a hard time to fulfill the following requirement (rephrased for simplicity):
Given value "a" in the first cell of a table row, color the row cells 1 - 4 in blue, and 5-7 in red.
Given value "b" in the first cell of a table row, color the row cells 1 - 4 in yellow and 5-7 in green.
This wouldn't be a problem with normal HTML as I could easily assign style classes to every cell, however I can't find the solution for the UI5 table.
Any ideas?
Thanks,
ChristianHi Nishant,
not sure if I undestand you correctly.
When I scroll the table, the data scrolls with the table correctly, but in the "Last Name" column the formatting gets messed up.
To solve this, you need to remove the previously added classes:
// Approach 2
template = new sap.ui.commons.TextView().bindProperty("text", {
parts: [
{path: "***" },
{path: "lname" }
formatter: function(***, lname){
// Remove previously added classes
this.removeStyleClass("cyan").removeStyleClass("yellow");
if(*** == "m" ){
<!-- approach 2 step B : Add Css style class to element -->
this.addStyleClass("yellow");
} else if(*** == "f" )
this.addStyleClass("cyan");
return lname ;
oTable.addColumn(new sap.ui.table.Column({ label: "Last Name",
template: template,
Same for the first approach using where you have to remove the custom data instead if the class.
This should solve the problem. (By the way this is already mentioned in this thread in my post from Mar 10, 2014 11:40 AM)
Greeets,
ben -
How can i set the alternating colors for a table rows
Dear All,
Please any one help me how can i set the Alternating colors for Table Rows.
i created a theam there i set the background alternating color to brown and i set the table design properity to alternating. but it is not reflecting.Hi,
The design property in Table properties should work for your requirement. Select "alternating" value for design.
Please see the API below:
design
Determines the appearance of the table. The property design can take the following values and is represented by enumeration type WDTableDesign.
alternating - The table rows are displayed alternately in a different color.
standard - The table background has one color. The individual table rows are displayed with grid net lines.
transparent - The table background is transparent. The individual table rows are displayed without grid net lines.
Check whether you have changed the right property or not? Also table should contain more than one rows to test this scenario.
Regards,
Jaya.
Edited by: VJR on Jun 17, 2009 6:43 PM -
I have a scenario in which i populate data in table ui thru Rfc call.Now I select a particular row then on clicking of a button the row color should change.how do i change colors of a particular row at runtime?
Note:dont not post blogs of colorful tables.
regards
Nikhil TapkirHi Nikhil,
Check out this link
http://help.sap.com/saphelp_nw04/helpdata/en/0e/23b3c8b0a238439f664f73a04e6332/frameset.htm
Thanks
Anup -
Conditional coloring in table row
Hi,
I want to show some table cells highlighted with some colors.for different condition.For example if status is active then show in green otherwise show in red.
How can i achieve ?User, please tell us your jdev version!
The way to go is to point the inline style of the component (or the style class if you have a css defined for the different colors) to a bean method. In the bean method you calculate the right color or style for the cell and return it. The bean method can access the other attributes of the current row rendered to get to the right result.
In some easy cases you can use a ternary EL to get to the right color like
#{row.value > 0 ? green : red}
which will color all positive numbers in the cell green and all negative numbers red.
Timo -
Table row change color on hover
Hi,
I don't know if it's possible to change table row color on mouse hover, I've been looking at skin-selectors (http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/skin-selectors.html#Global%20Selectors) and I haven't found any row style class for af:table Component... if anyone knows how to achieve this I would be thankful.Hi,
I replied to the other question of yours. I don't think this is possible because the row is not a component that can have a style applied to it. You may be more successful in applying the CSS to the components (outputText or inputText) on the table cells.
Frank -
Hello community!
I'm using a table in a view, and I'd like to color some rows depending on a condition value.
I've found some tips for coloring a row when using an ALV, but that's not my case.
How could I do that?
Thanks for any help =)
Have a great day =)
C.Hi,
In this link -
Re: How to make Row of a table Editable. -check Manoj's reply
they have used READ_ONLY to edit but you can use the same coding but replcae that READ_ONLY with the WDUI_TABLE_CELL_DESIGN type. Replace READ_ONLY as CELL_DESIGN.
Write the code in the WDODOMODIFY View and get the table reference.
In the LOOP.....
if....
cell_design = '01'.
else.
cell_design = '02'.
endif.
ie
LOOP AT lt_node INTO ls_node.
IF sy-tabix = lv_index.
ls_node-cell_design = '01'.
ELSE.
ls_node-cell_design = '02'.
ENDIF.
MODIFY lt_node INDEX sy-tabix FROM ls_node TRANSPORTING cell_design.
ENDLOOP.
Is this clear....
Regards,
Lekha. -
Based on some conditions table rows should be of different color
Hi Experts,
I have created one WD application which calls RFC. The displayed result is
Trip No Date Status
1 01-jan-2009 Approved
2 05-jan-2009 Rejected
3 09-jan-2009 Cancelled
I want to ensure that row no 1 should be of color 1 (say green color), row no 2 should be of color 2 (say red color) and row no 3 should be of coor 3 (say black color).
How I can do so?
Regards,
GaryHi
Please go through this forum, this will help you:
1. How to enable alternating color in a table rows?
2. How to Change the color of rows in a table
3. how to set table alternating color
Thanks
Susmita -
Need to color a Table row based on a Column value
Dear Alll
I have a requirement to color the rows of a table based on a column value in it. I have tried and surfed many useful materials over the net. but none of them solves my purpose. Please help me, I know that i can used OADataBoundValueViewObject and create a custom css file and apply color to a particular column of a table using a decode in the select statement of that VO.
But all i need is to color a particular row with a particular color. Need your help with this ........
Please do reply
Best Regards
Edited by: Antony Jayaraj on Mar 27, 2012 8:54 PMThese posts might help you.
How to change the row color based on Condition
Can we colour the rows in the column of a table
Regards,
Peddi. -
Getting error while setting color to table rows?
Hi All
I am trying to setting colors to table rows based on dropdown value.
lv_Dropdown vaue =1 i want to set one color, 2-another color like that.
For this I create attribute CELL_DESIGN of type WDUI_TABLE_CELL_DESIGN in node, and i bind this attribute to every column celldesign property in table. and my code in on select of dropdown.
data lr_column type ref to cl_wd_table_column.
data:obj_table type ref to cl_wd_table.
lr_column = obj_table->get_column( id = 'TABLE_WEEK1' ).
if lv_dropdown = 1.
lr_column->set_cell_design(
cl_wd_table_column=>e_cell_design-badvalue_dark ).
endif.
lr_column->bind_cell_design( path = 'SEGMENT1.CELL_DESIGN' ). ...Giving dump at r_colum = get_column( )
I follow correct code or not??
Cheers,
Venkys.Sorry Sarbjeet and baskaran i am not getting,
I want to set colors to row of a table on dropdown selection. In dropdown i ahve a code like
DATA lo_nd_segment1 TYPE REF TO if_wd_context_node.
DATA lo_el_segment1 TYPE REF TO if_wd_context_element.
DATA ls_segment1 TYPE wd_this->Element_segment1.
data lt_segment1 type wd_this->elements_segment1.
DATA lv_segment TYPE wd_this->Element_segment1-segment.
navigate from <CONTEXT> to <SEGMENT1> via lead selection
lo_nd_segment1 = wd_context->get_child_node( name = wd_this->wdctx_segment1 ).
get element via lead selection
lo_el_segment1 = lo_nd_segment1->get_element( ).
lo_el_segment1 = WDEVENT->GET_CONTEXT_ELEMENT( 'CONTEXT_ELEMENT' ).
get all declared attributes
lo_el_segment1->get_static_attributes(
IMPORTING
static_attributes = ls_segment1 ).
DATA : lv_dropdown type string .
lv_dropdown = ls_segment1-segment.
if lv_dropdown = 1. SET ONE COLOR TO THAT ROW
endif.
if lv_dropdown = 2. SET ONE COLOR TO THAT ROW
endif.
Now what should be the code in WDMODIFYVIEW method to set table row with colors.
Cheers,
Venkys. -
Coloring individual table rows based on a condition
Hi Experts,
I have a table bound to a node in the context via datasource property.
I was trying to color an individual row based on a certain value in the context node.
Can anyone help my achieve this please?
For example:
for( int i=0; i<table.size(); i++)
if(wdContext.tableNode().getTableElementAt(i).getFieldA().equals("Y"))
// then color the table row
Any suggestions?
MSolved.
Maybe you are looking for
-
Data Source Z*** is not defined in the source system
Hello All, I am facing a well known problem extracting data from R3 to the BI side. On both sides I've got SAP ALL. I created data source on R3 DEV side, tested it and it extracts data. I've replicated metadata on BI side and activated the data sourc
-
Changing Character set in SAP BODS Data Transport
Hi Experts, I am facing issue in extracting data from SAP. Job details: I am using an ABAP data Flow which fetches the data from SAP and loads into Oracle table using Data Transport. Its giving me below error while executing my job: (12.2) 05-06-11 1
-
My ipad was activated by my cousin so then i cant activate it by my apple ID so can i get into my ipad without using my cousins icloud? i know my apple ID and Apple password/
-
InDesign CS3; Tables; How to remove vertical stroke??
Have an 8 column table with 1/2pt vertical stroke/rule between each column. How can I remove/delete only the vertical stroke/rule between column 7 & 8??
-
Appended field is missing in field list of generic delta
hi all, i appended the generic extract structure in RSA6 and uncheck the hide box. now im unable to see the zz field in the field list in rso2 to set up generic delta, any ideas... Thanks, GK