cancel
Showing results for 
Search instead for 
Did you mean: 

UI element for complex table

Former Member
0 Kudos

Hello everybody,

I'm new to WD programming. I'm looking for an UI element to represent a complex table/matrix.

The table should have the following structure (in brackets are the different data models, values are example values):

...............factors1 (C) -->..|...1 (C)...| 0.95 (C).| 0.9 (C) .| 0.87 (C).| 0.85 (C).| 0.8 (C) ..|

quantity(A).|.factors2 (A)...|..2006(B)|..2007(B)|..2008(B)|..2009(B)|..2010(B)|..2011(B)|

-


......1 k.......|.........1.2......|....120.....|.............|.............|.............|..............|.............|

-


......5 k.......|.........1.1......|....110.....|.............|.............|.............|..............|.............|

-


......10 k......|.........1.0......|....100.....|.............|.............|.............|..............|.............|

-


-


...

-


...

-


(10 rows)

-


...

-


...

-


...

-


......100 k.....|.........0.5......|....50......|.............|.............|.............|..............|.............|

-


How can I realize this multidimensional structure?

Thanks for your help

Joschi

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

thanks for your answers. Rewards will follow, but at the moment I can't reward because of an SDN problem.

I tried to get familiar with dynamic UI programming. Seems to work. But I've got still one problem. In the table <b>one cell</b> (first year where the factor is 1) should be editable, the rest is readOnly.

How can I realize this? Is it possible to set properties of just one cell (in this example the cell where factor is 1 in the column of the first year)?

...............factors1 (C) -->..|...1 (C)...| 0.95 (C).| 0.9 (C) .| 0.87 (C).| 0.85 (C).| 0.8 (C) ..|

quantity(A).|.factors2 (A)...|..<u>2006(B)</u>|..2007(B)|..2008(B)|..2009(B)|..2010(B)|..2011(B)|

-


......1 k.......|.........1.2......|....120.....|.............|.............|.............|..............|.............|

-


......5 k.......|.........1.1......|....110.....|.............|.............|.............|..............|.............|

-


......10 k......|.........<u>1.0</u>......|....<b>100</b>.....|.............|.............|.............|..............|.............|

-


-


...

-


...

-


(10 rows)

-


...

-


...

-


...

-


......100 k.....|.........0.5......|....50......|.............|.............|.............|..............|.............|

-


Thanks a lot for your help

Joschi

Former Member
0 Kudos

Joachim,

Do you need whole column editable, or just single cell editable?

VS

Former Member
0 Kudos

Hi Valery,

just a single cell.

Joschi

Former Member
0 Kudos

Joachim,

For all columns except column with editable cell set TextView as cell editor. For this column set InputField as cell editor. Bind value property as necessary, and bind readOnly property to new context attribute (say IsReadOnly) of type boolean. Attribute must reside in same node that is used as Table data source.

Now when populating node elements set IsReadOnly to true for the node element that correspond to first row. All other elements will have IsReadOnly == flase by default.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Answers (2)

Answers (2)

Former Member
0 Kudos

Joachim,

You can display report like this with Table UI control.

1. You must create node with attributes like <b>quantity</b> and <b>factor1</b>, <b>factor2</b>, ..., <b>factorN</b>. If number of factors is static and "small", then create <b>factor</b> attributes at design time, otherwise create them at run-time. Correspondingly, either create/bind Table at design time, or at run-time in wdDoModifyView (if you creating attributes dynamically). SDN WebDynpro development area contains several tutorials about dynamic UI programming.

2. You have to populate node. Typically (as mentioned by Sridhar) you need to convert original node data to <b>report</b> node. Use either approach -- pre-population in wdInit or action handler, or on-demand supply function for <b>report</b> node.

3. You have complex header. If you are using NW04s consider ColumnGroup + GroupColumn to display such header or fixed table cells. In NW04 just place second line of headers as first element of <b>report</b> node.

4. If you want to show all rows without scrolling (common for reports) then set <b>visibleRowCount</b> of table to -1.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

sridhar_k2
Active Contributor
0 Kudos

Joschi,

If i understood your requirement,you want to show your table from multiple Data nodes, unfortunately we dont have any ready made solution for this.

For this you can create a node with attributes.lets say TestNode with value Attributes. In your implementation, add to these attributes programmatically.

ITestNodeElement testEle = null;

for(int i=0;i<3;i++){

testEle = (ITestNodeElement)wdContext.nodeTestNode().createTestNodeElement();

testEle.setVar1("DataNode1Value");

testEle.setVar2("DataNode2Value");

wdContext.nodeTestNode().addElement(testEle);

}

//Node, which is binded to table is TestNode

//var1,var2 are attributes in the nodes.

Correct me, if that is not your requirement.

Regards,

Sridhar