GridData.RemoveRow
 
 
 

GridData.RemoveRow

Introduced

v12.0 (2014)

Description

Removes the row at the given index. Rows below the removed row are shifted up by one index.

C# Syntax

GridData.RemoveRow( Int32 in_lRowIndex );

Scripting Syntax

GridData.RemoveRow( Index );

Parameters

Parameter Type Description
Index Long Index of the row to remove.

Examples

Python Example

import win32com.client
from win32com.client import constants as C
propName = "TheProperty"
gridDataName = "TheGrid"
siProperty = Application.ActiveSceneRoot.AddProperty( "CustomProperty", False, propName )
gridData = siProperty.AddGridParameter( gridDataName ).Value ;
gridData.ColumnCount = 3
gridData.RowCount = 3
for row in range( 3 ):
        gridData.SetRowLabel( row, "Row %d"%row )
        for col in range( 3 ):
                # 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 ) )
# Remove row at index == 1
gridData.RemoveRow( 1 )
Application.InspectObj( siProperty )

See Also

GridData.SetColumnType