cancel
Showing results for 
Search instead for 
Did you mean: 

Regarding TablecellVariant

Former Member
0 Kudos

Hi,

We have the requirement in tableView when I select a particular row the UI elements has to change for that entire row.

For EX: I have 3 columns, by default the UIelement is textView for all the records in those 3 columns, when I select a particular record the UIelements has to change as InputField, Dropdown, Checkbox and for the non selected records the UIlements is textview.

For this I have used TableCellVariant UI element, I am able to get the solution for the selected record but when I navigate to another record the UIelements are not changing to the default UI element for the previous selected record.

These are the steps I have followed

1) I have created one context node with 3 context attrobutes and binded the node to tableView.

2) I have 3 columns now, I have created one cellvariant for each column and I have created UIelement for each cellvariant according to my requirement.

3) I have assigned the variantkey for the cellvariant.

4) I have created one action method for the table lead selection. When I select a partular row I am setting variantkey value for the selected row.

Without this UIelement is there any alternative solution?.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi EP Developer,

interesting name

Set the variantKey to "" (empty string) to change from the cellvariant to the "normal" cell editor.

regards

stefanie

Former Member
0 Kudos

Hi,

Thanks for quick response, I have already set the "" for variantkey if that is not the selected record. When I given like this the UIelements are not changing for the selected record. If you have the code with the same requirement can you please provide me that code.

Former Member
0 Kudos

EP Dev,

Strange that this is not working...

Try the following instead of setting/removing variantkey.

1. Turn your attribute (related to variantkey) into calculated read-only attribute of type string;

2. In generatted getter write:


return element.index() == element.node().getLeadSelection() ? "EditVariantName" : null;

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Thanks Valery, I got the solution.

Answers (0)