Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. {{tag>category:"presentation server" }} ====== EditTables - The CELLPOSCHANGED event ====== === Published 31 OCT 2022 at 02:16:29PM === OpenInsight 10.2 adds a new event called **CELLPOSCHANGED** to the **EDITTABLE** control. This is effectively the same as the normal **POSCHANGED** event but with the addition of an extra parameter called "ContextFlags" that provides more information on //why// the event was raised. <code wp-block-preformatted> bForward = CELLPOSCHANGED( CtrlEntID, | CtrlClassID, | NextColumn, | NextRow, | ContextFlags ) </code> ContextFlags is a simple bitmask integer that contains the following flags: ^Bit Flag Value^Description ^ |0x00000001 |If set then the cell position was changed via a keystroke.| |0x00000002 |If set then the cell position was changed via the mouse. | Equates for these flags can be found in the PS_EDITTABLE_EQUATES insert record: <code wp-block-preformatted> Equ PS_EDT_CTF_NONE$ To 0x00000000; Equ PS_EDT_CTF_KEYSTROKE$ To 0x00000001; Equ PS_EDT_CTF_MOUSECLICK$ To 0x00000002; </code> Example - testing to see if the position (**CARETPOS**) was changed via a mouse click: <code wp-block-preformatted> $Insert PS_EditTable_Equates If BitAnd( ContextFlags, PS_EDT_CTF_MOUSECLICK$ ) Then // CARETPOS was changed by using the mouse. ... End </code> ==== Notes on using the CELLPOSCHANGED event ==== - The default promoted system **CELLPOSCHANGED** event handler performs the same processing as the default promoted system **POSCHANGED** event handler (i.e. data validation and required checking etc). - If a **CELLPOSCHANGED** event handler is defined by the developer then a standard **POSCHANGED** event will //not// be raised. - To preserve backwards compatibility with existing applications the default promoted system **CELLPOSCHANGED** event will //not// be compiled into a control if there is no **CELLPOSCHANGED** quick event handler. This is to ensure that **POSCHANGED** is always executed if **CELLPOSCHANGED** has not been //explicitly// set for a control by the developer. - **CELLPOSCHANGED** is available in OpenInsight 10.2 from the Beta 3 release onwards. === Comments === == Original ID: revdevx.com/?p=3832 == third_party_content/revdevx/20028.5947800926.txt Last modified: 2024/01/29 20:23by 127.0.0.1