Harness proD API Help
EPLAN.Harness.API.Projects.Documents Namespace / ReportData Structure / Item Property / Item(Int32,ColumnDescription) Property
Row of the table.
Column of the table.
Example
In This Topic
    Item(Int32,ColumnDescription) Property
    In This Topic
    Access a field in a table.
    Syntax
    public Property Item( 
       int row,
       ColumnDescription column
    ) {get;}

    Parameters

    row
    Row of the table.
    column
    Column of the table.

    Property Value

    Property with value, or null if empty.
    Exceptions
    ExceptionDescription
    Row index out of bounds, or column description is invalid.
    Example
    // Pick a column with the name "Length".
    ColumnDescription lengthColumn = reportTable.Columns.Where(n => n.Name == "Length").FirstOrDefault();
    
    // Print the whole column:
    Console.WriteLine("Length column:");
    for (int i = 0; i < reportTable.RowCount; i++)
    {
    	// You can use ColumnDescription for indexing.
    	Property value = reportTable[i, lengthColumn];
    	
    	// Empty fields are set to null.
    	if (value != null)
    		Console.Write($"{value.ToString()}; ");
    	else
    		Console.Write("<empty>; ");
    }
    Console.WriteLine();
    See Also