on 02-28-2012 12:06 PM
Hi All,
I want to raise an event when a cell is clicked on Single Markable Cell and get the row and column of that cell.
I have tried all the events of the table and also On Enter event of input Field.
But I am not able to trigger on click event .
Please help me out. Points will be rewarded.
Thanks,
Anil
Thanks for the reply.
But I cannot keep the Link in that cell, as on clicking that cell, I want to make that cell editable.
So I want a normal Input FIeld, which upon clicking has to make only that cell editable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The ON_CLICK event is triggered when an action on a column holding a non editable cell editor (Button,
Toggle Button, Link To Action) is performed (Button Click, Link Click).
So if your cell editor is an input field the on_click event does not get triggered, So You must use any of
the above non editable cell editors OR if you cant change the cell editor, then make the cells(with input
field as cell editor) input enabled by using the on_lead_select event and change the READ_ONLY
property of the input field for that particular row.
Create Hyper link to column :
DATA : o_link type ref to cl_salv_wd_uie_link_to_action.
Create object for o_link
Call method Set_text_field name
IMP
Value = '<Field name>'.
call method Get column of If_salv_wd_column_settings.
U will get Obj type ref to Cl_salv_wd_column and Call Set cell editor .......
Next
Very important step : Set_cell_action_event_enabled { Value = ABAP_false }method of if_salv_wd_table_settings ....
Event On click is only triggered if above method is set to false.
Otherwise On Cell Action is triggered...
Hi Anil,
If the cell editor is a link to action then it triggers the ON CLICK event , Write the following code into
the ON CLICK event handler to get the selected Row and Column ID.
Event Properties is a node with two attributes Name and Value of type string.
data: lr_node type ref to if_wd_context_node,
lt_event_properties type wd_this->elements_event_properties,
ls_event_properties type wd_this->element_event_properties.
field-symbols: <l_value> type any.
* fill internal table
ls_event_properties-name = 'COLUMN_ID'.
ls_event_properties-value = r_param->column.
append ls_event_properties to lt_event_properties.
ls_event_properties-name = 'INDEX'.
ls_event_properties-value = r_param->index.
append ls_event_properties to lt_event_properties.
ls_event_properties-name = 'ATTRIBUTE'.
ls_event_properties-value = r_param->attribute.
append ls_event_properties to lt_event_properties.
assign r_param->value->* to <l_value>.
ls_event_properties-name = 'VALUE'.
ls_event_properties-value = <l_value>.
append ls_event_properties to lt_event_properties.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
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.