on 05-29-2005 10:25 AM
Hi,
I want to add subtotal and total lines a Table UI. Is it possible ? I dont want automatic calculation. Only I want to add special lines. First four cell looks one blank cell, next 5. cell looks as in previous lines.
Best regards,
Altug Bayram
If your requirement is to create additional columns ,say for the Total fields, then this is made possible using
"IWDTableColumn".
Else, if an additional row is needed to display the total, then create an extra row element for the table, and calculate the total by looping through the other rows and display the same in the new row that was created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You may create additional table row elements for displaying the totals.Create a row and set the first field(or first&second fields combined) as "IDES AG (GREMANY)", and for the total-field, sum up the amounts until that row thru a loop, and fix the result in the cell corresponding to the amounts field.
True...
Iterate through the context
pseudo code
double sum;
for(int i = 0 ;i< wdContext.node<Row>.size();i++){
sum = sum + wdContext.nodeRow().getElementAt(i).get<amount>();
// will need to type cast to get to amount field
}
//set sum to the to the attribute which is bound the totals UI element
Regards
Pran
Hi,
Displaying the subTotal row is completely depending upon the condition when you want to display ?
You need to create a new Context with old Node structure.
double sum;
for(i=0;i<wdContext.Node<<Data>>().size;i++)
{
sum = sum + wdContext.current<Data>element.get<amount>();
//Copy the node contents into a new Node of same structure
If(Condition)
{
//Add a new Row in the new node for the subTotoal
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.