WPCubed Product Support

How to detect user clicking on a menu item

I am using a WPRichText for general notes relating to projects.

The notes are loaded when the user moves to a different record.

I would like to save any changes that are made immediately the user leaves the WPRichText to try and avoid the record being changed by another user.

I appreciate the need to keep focus on the component when clicking menu items.

Is there any way to detect the user clicking away from the WPRichText other than for having code in every menu items OnClick event?

#1 ♥ 0
2.9k Views 2 users read 1 min
support

Hi,

there are the events OnEnter and OnLeave which will be triggered when the user clicks the c font combo box, for example. Speedbuttons and menu items do not receive the focus.

But You should consider a different approach -

when a record is entering edit mode (see DataSet events) You need to lock this record. No other user can now enter edit mode for this record. Locking can be done with a seperate locking table on the sql server.

Alternatively - do NOT use the DBWPRichText. Go into and leave edit mode "manually".

Julian

#2 ♥ 0
This category is archived. No new posts are possible.