GridData.ReadOnly
 
 
 

GridData.ReadOnly

Introduced

v12.0 (2014)

Description

Sets the read only mode for the whole grid data.

C# Syntax

// get accessor
Boolean rtn = GridData.ReadOnly;
// set accessor
GridData.ReadOnly = Boolean;

Examples

Python Example

propName = "TheProperty"
gridDataName = "TheGrid"
siProperty = Application.ActiveSceneRoot.AddProperty( "CustomProperty", False, propName )
gridData = siProperty.AddGridParameter( gridDataName ).Value ;
gridData.ColumnCount = 2
gridData.RowCount = 2
for row in range( 2 ):
        gridData.SetRowLabel( row, "Row %d"%row )
        for col in range( 2 ):
                # Only set column labels once (when processing the first row)
                if row == 0:
                        gridData.SetColumnLabel( col, "Col %d"%col )
                gridData.SetCell( col, row, "%d,%d"%( col, row ) )
gridData.ReadOnly = True
Application.InspectObj( siProperty )
Application.LogMessage( gridData.ReadOnly )