cancel
Showing results for 
Search instead for 
Did you mean: 

Need method to get detail for clicked attribute in table?

mangesh_sonawane
Participant
0 Kudos

Hello Gurus,

My scenario is when i clicked a any element in table that should be editable.

Its working with lead select but i want it with when i clicked on perticutar element only that element should get editable.

Can anyone tell me how i should get the that which element i had clicked ?

Any method to get the clicked element?

Thanks & Regards,

Mangesh Sonawane

Accepted Solutions (1)

Accepted Solutions (1)

amy_king
Active Contributor
0 Kudos

Hi Mangesh,

What you need is an event to trigger which you can then handle to toggle your table cell from readOnly to editable, however there is no onClick event for InputFields (or other UI elements) so you cannot capture the user simply placing their cursor in the table cell.

InputField has an onEnter event. You could toggle its readOnly property when the user places their cursor in a table cell and hits the Enter key.

Cheers,
Amy

mangesh_sonawane
Participant
0 Kudos

Hello Amy,

I dont want with enter command, i want when they click using mouse on particular cell.

is it possible?

Regards,

Mangesh Sonawane

Former Member
0 Kudos

Hi Mangesh,

     In Web Dynpro we have fixed set of event handler which you can you found in the properties of any UI element in the view. Simillarly chek in the input field of your table.

   There is no event handler for on mouse click till now, so I dont think this is possible.

Regards,

Monishankar Chatterjee

former_member184578
Active Contributor
0 Kudos

Hi,

As Web Dynpro Application runs in browser, there are some restrictions. Unlike double click in R/3 there is no double click event in WDA.

You need to use LinkToAction UI and use onClick event to achieve the same.

For making the single cell editable check my article: How to make selected Row of table editable in Web Dynpro ABAP

Instead of lead selection do the same in onClick of Link to Action UI.

Hope this helps u.,

Regards,

Kiran

amy_king
Active Contributor
0 Kudos

Hi Mangesh,

Each TableColumn in a Table contains its own Cell Editor. The events which are available for you to program against depend on what UI element you choose for the Cell Editor. For example...

  • InputField
    • onEnter
  • LinkToAction
    • onAction
  • TextView
    • no events
  • etc.

But no UI element has an onClick event so you will not be able to trigger an event when the user simply clicks on a cell of the Table. You'll need to find an alternative approach (such as ones suggested in this discussion) that meets your needs since what you really want is not currently possible.

Cheers,

Amy

Answers (2)

Answers (2)

mangesh_sonawane
Participant
0 Kudos

Hello gurus,

Thanks for all your valuable replies.

So i assume that it is not possible which i asked.

So created based on lead select http://scn.sap.com/docs/DOC-34955

Thanks & regards,

Mangesh Sonawane

Former Member
0 Kudos

Are you re-using the ALV component?

mangesh_sonawane
Participant
0 Kudos

hi Abdullah,

Nope im using simple table ui element

Regards,

Mangesh sonawane

Former Member
0 Kudos

Hi Mangesh,

   What exactly u try to mean by element. In context node ( displayed in table ) an elemt represent a

selected entry i.e. a row of a table. What is exactly your req when u click on any cell of the table the

full row will get editable or the particular cell ?

Regards,

Monishankar C

mangesh_sonawane
Participant
0 Kudos

Hi ,

I want to make only that cell editable not row.

Regards,

Mangesh Sonawane