Grid.SetEditable

Grid.SetEditable (

string ObjectName,

boolean Editable )

Example 1

-- Get the current editable status
bEditable = Grid.GetEditable("Grid1");

if bEditable then
Grid.SetEditable("Grid1", false);
else
Grid.SetEditable("Grid1", true);
end

Toggles the ability for the user to edit the contents of the grid

Example 2

-- Find out if the grid is editable
bEditable = Grid.GetEditable("Grid1");
-- find out if 3,2 exists
bValid = Grid.IsCellValid("Grid1", 3, 2);

-- if it is not editable and cell 3,2 exists
if (not bEditable) and (bValid) then
-- make the grid editable
Grid.SetEditable("Grid1", true);
end

Make the grid editable if it is not and if a certain cell exists

See also: Related Actions