on 04-30-2009 9:31 AM
Hello Dear WD Experts,
I am facing a new problem.
There is a editable Table UI-Element on the view.
After any user has entered some data into the cells
he hits the enter key and I am intending to display
the result of mathematical calculation on a label.
Qestion 1)
How can I ask for a enter-key event
Qestion 2)
How can I refer to the label UI-Element in order
to display the result
I thank you all in advance for kindly efforts
Best Regards
Ilhan Ertas
How can I ask for a enter-key event
OnEnter event is available for cell editor 'Inputfield',
goto table uielement->column->celleditor->events->OnEnter : Create an action.
How can I refer to the label UI-Element in order to display the result
Read your attribute which is bound to the label uielement and set the value
" If you are directly bindind an attribute, use this code
DATA lo_el_context TYPE REF TO if_wd_context_element.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* get single attribute
lo_el_context->set_attribute(
EXPORTING
name = `CONTENT` " attribute name
IMPORTING
value = lv_value ). " your result
" If you are binding an attribute which is in a node, use this code
Data: l_node type ref to if_wd_context_node.
l_node = wd_context->get_child_node( 'NODE NAME' ).
l_node->set_attribute( exporting name = 'attribute name'
value = lv_result ).
Regards,
Radhika.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think You should use TextView in place of Label.
Because Label will ask to set property Label For which is mandatory.
I hope it helps.
Regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create an action for sum logic and assign that action to onenter of inputfield . And Set the total in an attribute and bind it with label.
I hope it helps.
Regards,
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
As you said your table is editable.So the cell editor is input field.Go to properties of cell editor you will find event OnEnter create an event.This will trigger when you press Enter button.
Is your lable part of of the table or outside of the table?
If it is outside of the table create sepeate context attribute and bind the attribute to lable.When you calculate the amount just update the value to the context attribute.
if it is another column.You already known which row it is and also you will have element reference.So you can easily update the value
Edited by: suman kumar chinnam on Apr 30, 2009 10:38 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.