Disallow Editing Specified Cells in a Datagrid
ray at linkit.com
Wed Nov 20 22:06:07 CET 2013
Trapping for the EditCellOfIndex really does the trick. The two
parameters which come in giving me the column name and line number are
also quite handy.
Another one bites the dust!
On 11/20/2013 2:45 PM, zryip theSlug wrote:
> It exists different possibilities depending the conditions you need
> for locking a cell.
> A possible solution is to trap in the datagrid group script, the
> EditCellOfIndex message sent when one is double clicking on a cell.
> Here is an example for locking a cell if it contains the value "Locked cell":
> on EditCellOfIndex pTheColumn, pTheIndex
> if GetDataOfIndex(pTheIndex, pTheColumn) is "Locked cell" then exit
> pass EditCellOfIndex
> end EditCellOfIndex
> On Wed, Nov 20, 2013 at 8:03 PM, Ray <ray at linkit.com> wrote:
>> Does anybody have a way to disallow double clicking specified cells in a
>> datagrid to edit them while continuing to allow the majority of cells to be
>> I'm currently catching the preOpenFieldEditor message and then sending my
>> own handler which discontinues field editing after it has begun, but by that
>> time the user has already opened the cell editing field. This looks shabby
>> (when I close it back up) and it might not work well on slower processors.
>> I'd prefer to not let the editing process get started in the first place.
>> Ray Horsley
>> LinkIt! Software
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription
> Best Regards,
More information about the use-livecode