Disallow Editing Specified Cells in a Datagrid
dunbarx at aol.com
dunbarx at aol.com
Wed Nov 20 14:51:47 EST 2013
Ray.
Could you generally set the "allowEditing" (which is global for the whole DG) to false, and open it only when certain cells are (or are not) clicked on?
Craig Newman
-----Original Message-----
From: zryip theSlug <zryip.theslug at gmail.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Wed, Nov 20, 2013 2:46 pm
Subject: Re: Disallow Editing Specified Cells in a Datagrid
Ray,
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
EditCellOfIndex
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
> edited?
>
> 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.
>
> Thanks,
>
> 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
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
Best Regards,
--
Zryip TheSlug
http://www.aslugontheroad.com
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list