Disallow Editing Specified Cells in a Datagrid

zryip theSlug zryip.theslug at gmail.com
Wed Nov 20 14:45:15 EST 2013


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




More information about the Use-livecode mailing list