on 08-31-2005 5:58 AM
Hi
i want to add the values of one column in the table that are given by the user. I set the "calculated" property of the corresponding context element in the controller as true and then writing the code for it. But when i run my application, then even if i give valid data in the corresponding column, it still shows the message errors i have set for the validations and clears the field.
is there any way in which this can be calculated without setting the "calculated" property as true?
If yes, then how to access the values of the column?
Thanks & regards,
Anupreet
Hi,
n is the size of the node !
Example :
for (int i = 0; i < n; ++i) {
IProductsElement item = wdContext.nodeProducts().getProductsElementAt(i);
int quantity = item.getQUANTITY();
total = total +quantity ;
}
total will have the total.. create a calculated attribute and put this code in it !
Validations wont be affected because of calc attr..
what error s are it givin
Regards
Bharathwaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Without using the Calculated property you can proceed the following way suppose you have a Node A with attribute a,b,c.
then you can get each of these values using
wdContext.current<name of node>element().get<attribute>();
The above code gives the value for currently selected row.
Similarly you can get all attributes and perform the required operations.
To get values for particular row you can use
wdContext.node<name of node>().get<name of node>ElementAt(i).get<attribute name>();
Here i is the index of the particular row.
Hope this helps.
Revert back for further clarification.
Regards,
Leena
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.