on 10-03-2005 6:45 AM
Hi Everybody!
A simple question :
I have a tableView in a BSP. I want to make a special design for some rows, depending on values.
So I use an iterator, and within the method
RENDER_CELL_START
, I try to write something forP_STYLE
parameter, something like this :P_STYLE = '<td style=`background-color:#CCAADD;`>'.
but of course it's not working...
Any idea from BSP professionnals ?
Thanks!
François
This parameter does not actually allow you to enter your own style - I got annoyed by it myself when I started working with iterators.
If you debug a bit into the code of the method R_TXT_CELL of class CL_SAPTABLECELL you come across this part:
IF p_style IS NOT INITIAL.
SPLIT p_style AT ';' INTO TABLE styletable.
LOOP AT styletable ASSIGNING <style>.
SPLIT <style> AT ':' INTO stylename stylevalue.
TRANSLATE stylename TO LOWER CASE.
IF stylename EQ 'celldesign'.
...
From this (and the follow-up lines) we can learn that the only style attribute that can be used has to be called <b>'celldesign'</b>, and its allowed values are the ones in the table m_tableview->m_htmlb_tableview->mc_render_lib_d2_rt_validation->_et_stcd (runtime name of course).
For a quick reference, here are the values of this table:
STANDARD
ALTERNATING
TRANSPARENT
NEGATIVE
POSITIVE
TOTAL
SUBTOTAL
SUBTOTAL_LIGHT
BADVALUE_DARK
BADVALUE_MEDIUM
BADVALUE_LIGHT
CRITICALVALUE_DARK
CRITICALVALUE_MEDIUM
CRITICALVALUE_LIGHT
GOODVALUE_DARK
GOODVALUE_MEDIUM
GOODVALUE_LIGHT
GROUP_HIGHLIGHTED
GROUP_HIGHLIGHTED_LIGHT
KEY_MEDIUM
GROUP_LEVEL1
GROUP_LEVEL2
GROUP_LEVEL3
MARKED
FILTER
FILTERICON
POPIN
So, we have to live with this possibility - otherwise you would have to use a HTML element which you place into the cell, and which you can apply your styles to.
Cheers,
Max
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks!
I understand better what was the problem...
Unfortuantely, it doesn't work ; I write:
method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START .
if m_row_ref->MENGE_VAL < 1.
P_STYLE = 'GOODVALUE_DARK'.
endif.
endmethod.
And I precise that there's an editable field in the table.
Any idea?
Best regards
François
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.