cancel
Showing results for 
Search instead for 
Did you mean: 

Simple questions on Tables

Former Member
0 Kudos

Hi,

can u tell me how to disable checkbox that comes with the table, and how to change back ground color of a particular column. How to enable sort function for each column ? Is there any standard functionality to do this?.

Thanks.

Sunita.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Use the clearSelection() to uncheck and create a attribute of type boolean in the node you use as datasource for table and Set the attribute based on condition

Regards

Saravanan K

Former Member
0 Kudos

I have used selection mode, to disable checkboxes, Its working fine.

what code I need to write when I use action for a column.

Thanks,

sunita.

Former Member
0 Kudos

Hi,

This is blog speaks about colorful table.Have a look at this thread

/people/sap.user72/blog/2006/04/25/colourful-table-in-web-dynpro

Regards,

Saravanan K

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks ALL.

/Sunita.

Former Member
0 Kudos

Hi,

For disable the checkboxes,

you should create a boolean type attribute in context under the node which is bound to the table. The no.of boolean attributes belongs to that how many checkboxes you have in your table row.

And there is no property to change the background of the column.

For Table sorter,

in the SDN, from the "sample applications and tutorials" and you can get the list of samples and tutorials, find the sort functions. when you click this you can get a page to download the sample.

from that you will get zip file which contains "TableSorter.java". store it into your webdynpro project under a package.

Create an action bind it to the onAction property of the column. And also create one context attribute with type of TableSorter from the java native type. need not to bind it with any UI Element's property.

write the following code in that action part,

wdContext.currentContextElement().get<SortContextname>().sort(wdEvent,wdContext.node<Tablenode>());

in DoModifyView() write the following,

if (firstTime)

{

IWDTable table = (IWDTable) view.getElement("<TableID>");

wdContext.currentContextElement().set<SortContextname>( new TableSorter(table, wdThis.wdGet<SortingActionName>Action(), null));

}

this will help you.

regards

karthik

Former Member
0 Kudos

Hi,

<i>how to change back ground color of a particular column</i>

Go through thread. Only helps if you are using NW04s.

<i>How to enable sort function for each column ?</i>

Search this forum with "TableSorter" as the query.

Regards,

Satyajit.