cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Table UI Element

Former Member
0 Kudos

Hi All,

We are working on a PoC for a client in Webdynpro java. In webdynpro java table which is editable (columns are input fields) is there any work around so that we can make particular row / cell in that table as non- editable. We don’t want to make entire column as non editable. If anyone worked on this please let us know.

regards

vamsi krishna

Accepted Solutions (1)

Accepted Solutions (1)

Stefan-EA
Contributor
0 Kudos

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Vamsi,

Firstly, did you achieve your requirement for making particular row/cell as non-editable in Table?

If not, read below:

I saw your comments on Using Table Cell Variants in NW 2004s , and you've not "..make particular row / cell in that table as non- editable..." specified anywhere that what is the condition for any particular cell/row to be non-editable.

Anyways, I just made/extended the wiki code by changing a little to get the below:

If my condition is to make the 4th row cells as non editable - with the code change the above (screen 2) made possible. Where as the rest of the row cells are open for editing as expected required by you.

Thanks,

MS

Former Member
0 Kudos

Hello Naga Devisetty,

Thanks for ur reply. I would like to know how did u do the 4th row as non editable and also is it possible that only the name field(in ur example) is made non editable while the gender field is editable like all other rows are.

regards

vamsi krishna

Former Member
0 Kudos

Hi Vamsi,

Change your getTableDataVariant with the above code with your own condition, and I hope it clears your doubt on how to make row cells as non-editable of your choice!

For your question on just NAME filed to be non-editable and keep others editable, I think we should be using SingleMarkableCell..!

Thanks,

MS

saurabh_vakil
Active Contributor
0 Kudos

Hi,

You can create a boolean attribute within the context node bound to the dataSource property of your table. Bind this boolean attribute to the editable property of your input field in which ever column you want this.

Then, when you are populating data in your table, depending on your conditions (to make the input field editable/non-editable) set this boolean attribute either true (input field is editable) or false (input field non-editable).

Regards,

Saurabh

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

Hi Saurabh,

thanks for ur reply. i tried doing what u said . but when the boolean value is false/true the whole coloumn is becoming non editable/ editable. but i want a single cell of that particular row to be non editable.

regards

vamsi

saurabh_vakil
Active Contributor
0 Kudos

Hi Vamsi,

After binding the column's input field editable property with the boolean context attribute (this attribute should not be created directly under the root Context node, but under the context node which you are binding to your table's dataSource property), while populating data in the table write the logic for making specific cells editable/non-editable as below:

//suppose you want to make cells in even rows non-editable and odd rows editable

for(int i=0; i<Node.size(); i++)

{

     if(i%2 == 0) {

          //set the boolean attribute as false so the cell at this index becomes non-editable

     }

     else {

          //set the boolean attribute as true making cells at this index as editable

     }

     //code to populate data in remaining columns of table

}

In this way, depending on your condition on which you want to make specific cells editable, this can be achieved.

Regards,

Saurabh

vijay_kumar49
Active Contributor
0 Kudos

Hi Vamsee,

Please reffer below document.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80d81237-b780-2a10-d398-cc33af6bd...

I hope this is help full for you.

Regards

Vijay Kumar Kalluri