cancel
Showing results for 
Search instead for 
Did you mean: 

cell coloring

Former Member
0 Kudos

hai

i have one scenario that is

table column is availble like staus

when data retrive the value of status is in progress it showing in cell as red color background.

it is also reflected when onlead select on that row shows in form.

form filed also should be in same color back ground.

how to do this

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hai Eswar,

Take One Context Attribute. For Ex. it is " Color " .Right Click on it --> Select Properties. --> In the Properties, Select Type as --> com.sap.ide.webdynpro.uielementdefinitions.TableCellDesign ( You can Select this type from Dictionary Simple Type ). --> bind this Attribute to the Your required TableColoumn's cellDesign's Property.

Now you can set required color to it like below.

wdContext.currentContextElement().setColor(WDTableCellDesign.BADVALUE_DARK); ( For Red Color)

wdContext.currentContextElement().setColor(WDTableCellDesign.STANDARD); ( For Standard Color)

Refer this Blog for other color's

With Regards,

Roop Kumar.

Edited by: Roop Kumar Annavarapu on Sep 23, 2008 12:27 PM

Former Member
0 Kudos

Hai Roop Kumar,

Thanks for reply and u r post is usefull to me.

it is possible for table column.

but in case of Form filed.

iam projecting filed in form also.

Former Member
0 Kudos

Hi Eswar,

Sorry for late reply.

Cell coloring is possible for table column.

I'm not getting the Exact Meaning of the below lines

but in case of Form filed.

iam projecting filed in form also.

Send me Clearly about your Requirement .

With Regards,

Roop Kumar.

Former Member
0 Kudos

Hai Roop kumar,

Thanks for responding .

here status field is in one of the table coulmn.

And also i applied UIelement in Templete "FORM " as Textview.

Former Member
0 Kudos

Hai roop kumar ,

u r code where we need to write in the application. for setting color

i triggering the action which can fill the data in table.

Former Member
0 Kudos

Hi Eswar,

After u fill the data in the Table u can write the Code.

With Regards,

Roop Kumar.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Create one value attribute under your table node like colourow of type com.sap.ide.webdynpro.uielementdefinitions.TableCellDesign

and bind this value attribute to the column property Design.

And write a code in wdDointi()

Iterator j = WDTableCellDesign.iterateValues();

{

for(int i=0;i<=tabledata.length-1;i++)

WDTableCellDesign design = (WDTableCellDesign)j.next();

tab.setColumncelldesign(design);

}

Former Member
0 Kudos

Hi..

Making colourful of specific table rows is my requriment. am jus going thru ur code , but there i did't find the tab(tab.setColumncelldesign(design);)

And my requirment is to make the specific rows to be made colour ,

if u have any idea plz share with me.

Regards

Rajesh

Former Member
0 Kudos

Hi,

refer the following blog,

Colourful Table in Web Dynpro

Regards,

ramesh