function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
OzymandiasOzymandias 

Make pencil icon appear for inline edit fields in pageBlockTable

I'm currently using the inlineEditSupport component to allow users to edit certain fields in a pageBlockTable that displays a list of custom objects. It works fine, although I can't figure out how to make the standard pencil icon appear when you hover over a table cell that allows inline editing. Without this, it isn't obvious to the user that they could edit the cell by double-clicking on it.

 

Can anyone point me in the right direction?

Best Answer chosen by Admin (Salesforce Developers) 
IspitaIspita

It is a VF page which you are using you can can use of your own custom DHTML effects to give the same effects. Any standard DHTML website will provide you with ssuch code snippet.

All Answers

IspitaIspita

It is a VF page which you are using you can can use of your own custom DHTML effects to give the same effects. Any standard DHTML website will provide you with ssuch code snippet.

This was selected as the best answer
kiranmutturukiranmutturu

do u put the mode attribute for pageblock or not like below

 

<apex:pageBlock mode="inlineEdit">....then the pencil symbol will come..

OzymandiasOzymandias

Kiran, I tried setting the pageBlock mode to "inlineedit", but it still didn't work. Seems to me that it will only work in conjuction with the <apex:detail> component, which I don't use in my VF page.

 

I ended up doing as Ispita suggested and wrapped the column contents in a div which uses onmouseover and onmouseout to display and hide the pencil icon. It works fine now. Thanks

wintri1wintri1
If you can place the table within a pageBlockSection then the pencil icon should appear on hover.