cancel
Showing results for 
Search instead for 
Did you mean: 

How to make a row enabled for lead selection and make other Rows disabled?

Former Member
0 Kudos

Hi,

What I require is:

In a webdynpro table , which can have multiple rows, I want to make the rows which are retrieved fom backend as disabled for selection.

And when I add a new row (using an ADD functionality) , this newly added row should only be enabled for lead selection.

The Table property "enabled" can be assigned a context , and can be used to control the disabling of whole table.But then if I add the new row to this table, even this will be disabled.

I can set lead selection to a the new row, but if the whole table is disabled, this won't work.

Please suggest a solution for this.

Thanks,

Richa

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Do not set the enabled flag to the whole table but to the editors of each column. Bind the enabled property to a calculated boolean flag in the data source node. In the get method of this flag add a code that will make the editor enabled only if it belongs to the lead selection element.

Now do not allow the selection of rows in the table (there is a property for this, perhaps is named rows selection I don't remember well now), but change the lead selection of the data source node to the desired element when you add the element programatically.

Hope it helps.

Former Member
0 Kudos

What is this good for? Do you mean "readOnly" instead of "disabled for selection"? Please clarify.

Armin

Former Member
0 Kudos

Hi Armin,

The rows retrieved from database needs to be such that the user should not be able to select them in order to disallow any modification.

So I suppose these should be "readOnly" as well as "disabled for selection".

Whereas newly added row should NOT be readOnly and should be enabled for selection so that it can me modified/deleted based on lead selection.

-Richa

Former Member
0 Kudos

Hi Richa,

1.Create one more attribute inside the node binded to the table called enabled of type boolean.

2. Bind this attribute to the enabled property of all the column editors in your table.

3. For all the rows that are from backend set the enabled value to false.

4. For all the rows added manually set the enabled value to true.

Hope this is the thing you were looking for.

Regards,

Murtuza

Former Member
0 Kudos

Hello Richa,

One other thing you can try is

1> Create two table controls make the selection of one as none and the pther as auto/single

2> Create two context variables of type visibility

3> When you are displaying the data from DB then do not show the table for which you set the selection as auto/single

4> On add buton's action hide the DB table and unhide/show the table for whom the selection property is single/auto

I hope it resolves the query.

Thanks and Regards

Pradeep Bhojak

Former Member
0 Kudos

Hi Richa,

One way to achieve this is to provide checkbox( will be used for row selection) column as first column of table, and disble checkbox for all database fteched records, and enable it for newly added rows.

Other way is to use tow tables, not that good.

Regards,

Ganga.