on 12-09-2009 12:29 PM
Hi Everyone,
i have one view with table which has three fields, when i click create button i want table fields to be in editable mode.
Regards,
vino.
hi ,
create a Action for your Button UI , in the OnAction property . Create a context attribute under the context node
of type WDY_BOOLEAN .
Now bind it with the ENABLE property of your field which u want to set in enable mode . Set it to 'X' to enable the fields ,
and ' ' ( blank) to disable the field . Go to control wizard (CNTRL+F7) , selct read context node /attribute , select the appropriate
context attribute using set_attribute method
DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
DATA ls_cn_node TYPE wd_this->element_cn_node .
DATA lv_attr LIKE ls_city-ca_attr.
* navigate from <CONTEXT> to <CN_VISIBLE> via lead selection
lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_ca_attr).
* get element via lead selection
lo_el_cn_node = lo_nd_cn_node->get_element( ).
* set single attribute
lo_el_cn_node->set_attribute(
EXPORTING
name = `CA_ATTR`
value = 'X').
// attribute CA_ATTR under node CN_NODE set to 'X'
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ,
u can bind the context attribute to the ENABLE property of ur TABLE UI as well , the table wud be editable
for enable /disable of ur UI , bind it with the context attribute of type WDY_BOOLEAN
set the context attribute to 'X' for enable and ' ' for disable
for visible/invisible of ur UI , bind VISIBLE property of it with the context attribute of type WDUI_VISIBILITY
set the context attribute to '02' for visible and '01 ' for invisible
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gnerally you would create a context attribute that you can use to control the read-only/edit mode of hte UI elements. When you press the button swap the value in this context attribute. Bind this attribut to the UI element properites for enabled.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
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.