on 06-26-2007 12:13 PM
Hi experts,
I have scenario in which i have created one node with two columns..one for data and othr for cell design...both dis node attributed are bind to standard table's column's value property and cell design properties respectively...
Bt now..dis is only poss in Standard tables...and i want da same in ALVs..
In which m not gettin where to bind dat cell design attribute of da node to ALV table...lik we bind data..using set_data( ) thg...
Hope u understood ma query...
Please help me out to solve dis.....
Thanks and Regards,
Runali.
Hi Runali,
You can achieve the same in ALV by setting the cell_design property of an ALV column. It would be as follows:
lr_column = lr_column_settings->get_column( ID = id ).
lr_column->set_cell_design( <design> ).
Look into the class cl_salv_wd_column for the enumeration and see the possible values cell_design can take. Each value corresponds to a color. You can set the color of your choice.
<b>Please award points if the answer is useful to you.</b>
Regards,
Nithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then have a field cell_design in your context. And instead of calling set_cell_design, you should just say
lr_column->set_cell_design_fieldname( 'CELL_DESIGN' ).
In ALV, for every property, a method set_<property>_fieldname is available to bind the proerty to a context attribute. When you initialise your ALV settings, set this attribute and it will be bound to the cell design.
The attribute cell_design should be in the same context node that you bind to the ALV. You can make the column with column ID cell_design as invisible. This way you can set the colors even at an individual cell level. In your internal table, if you wish, you can set a particular color for a set of values etc.
Hope this helps you solve your problem.
Regards,
Nithya
Still not completely answered!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.