cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Cell variant assignment

IanStubbings
Active Participant
0 Kudos

Hi

I wish to dynamically assign a table variant with a cell editor of type checkbox and then check/uncheck/make readonly the field accordign various situations. I only wish this to happen on certain rows.

So far I can achieve this my using context attributes and binding to these. My only concern is that there are a lot of extra attributes required as thses cell variants appear on 7 columns and then 8 tabs.

I would prefer to achive this solution by using the view->get_element approach, but so far I have only managed to assign the cell variant to the entire column and not an individual cell.

Any ideas?

Cheers

Ian

Edited by: Ian Stubbings on Mar 10, 2008 8:52 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In case of a checkbox, based on the value of the attribute bound to the checkbox column, the checkbox will be checked/unchecked. Anyways, you have to have a context node of cardinality 0...n, with an attribute which can be bound to the checkbox. As far as readonly property is concerned, you can have an additional attribute in the same context node, and bind that to the read-only property of the checkbox. Alternatively, I think you can use the SET_ATTRIBUTE_PROPERTY of the IF_WD_CONTEXT_ELEMENT class.

Hope this helps.

Regards

Wenonah

IanStubbings
Active Participant
0 Kudos

Thanks Wenonah.

My solution with the context attributes works fine but I am concerned that it is not as neat as a fully dynamic (no context attributes) solution.

At least using my method the binding etc are more transparent.

Cheers

Ian

Answers (0)