ComponentOne FlexPivot for WinForms
C1.Win.FlexPivot.4.5.2 Assembly / C1.Win.FlexPivot Namespace / C1FlexPivotGrid Class / AddItem Method / AddItem(String) Method
String containing the data for the new row. Items are separated by tab characters by default. You can change the separator character using the C1.Win.C1FlexGrid.C1FlexGridBase.ClipSeparators property.

In This Topic
    AddItem(String) Method
    In This Topic
    Adds a row to the grid and populates the new row with data.
    Syntax
    'Declaration
     
    Public Overloads Function AddItem( _
       ByVal item As String _
    ) As Row
    public Row AddItem( 
       string item
    )

    Parameters

    item
    String containing the data for the new row. Items are separated by tab characters by default. You can change the separator character using the C1.Win.C1FlexGrid.C1FlexGridBase.ClipSeparators property.

    Return Value

    A reference to the new row.
    Remarks

    You can also add and remove rows using the C1.Win.C1FlexGrid.C1FlexGridBase.Rows collection. The C1.Win.C1FlexGrid.C1FlexGridBase.AddItem method provides a concise syntax for creating the row, populating it with data, and then adding it to the grid.

    Before using C1.Win.C1FlexGrid.C1FlexGridBase.AddItem to add a large number of rows to the grid, remember to set the C1.Win.C1FlexGrid.C1FlexGridBase.Redraw property to false. When finished adding the rows, set C1.Win.C1FlexGrid.C1FlexGridBase.Redraw back to its original value. This will significantly improve performance.

    Example
    The code below adds 300 rows to the grid.
    See Also