cancel
Showing results for 
Search instead for 
Did you mean: 

to delete a column in a table

Former Member
0 Kudos

could any can tell me how to delete a column

means a attibute of a perticular node

thru atable

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi

You want to delete the row or column

If row means , type the follwing code in the method onActionDeleteEntry()

public void onActionDeleteEntry(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent)

{

int lead = wdContext.nodePeople().getLeadSelection();

if(lead>=0)

{

wdContext.nodePeople().currentPeopleElement());

}

}

Regards

Chandran

Former Member
0 Kudos

Hi,

if u want to delete particular row or column,

u want to delete row use this code,

people is a node having all attributes

1)create an button and write this code in onActionbutton as

int lead= wdContext.nodePeople().getLeadSelection();

if(lead>=0)

{

wdContext.nodePeople().removeElement(wdContext.nodePeople().currentPeopleElement());

}

former_member206397
Contributor
0 Kudos

Hi ,

Actually when u want to delete the col, If u want to delete it at creation time that means you are deleting the particular attribute from the node. so u can go to layout tabpage then outLine and delete the col.

If u want to delete at runtime then u can do as bellow. Create an attribute called colVisible and set the type com.sap.ide.webdynpro.uielementdefinitions.Visibility

Now go to the property of that attribute ( which u want to delete) and at visible property set colVisible. now within WDinit() method write the following code.

wdContext.currentContextElement().setColVisible(WDVisibility.NONE);

Through this code u can make it visible and Invisible as per your requirement. Just Change the "NONE" time to time. If u want to permanently make it invisible then go to the visibility property and set it none.

Former Member
0 Kudos

Hi,

You mean you want to delete the node attribute dynamically, so that it is not shown in the table.

or you dont want to show a column of a table at runtime.