# Adding Rows and Columns

## Content



### To add rows to a chart group, do the following:

Set the [RowCount](/componentone/api/win/online-chart3d/dotnet-framework-api/C1.Win.C1Chart3D.4.8/C1.Win.C1Chart3D.Chart3DDataSetGrid.RowCount.html) property to the new number of rows.

If the data is irregularly-grid, set the [RowDeltaArray](/componentone/api/win/online-chart3d/dotnet-framework-api/C1.Win.C1Chart3D.4.8/C1.Win.C1Chart3D.Chart3DDataSetIrGrid.RowDeltaArray.html) property for the space between a new row and its predecessor.

Set the Item property for each of the new points.

For example, the following code adds a fourth row of three points to a ChartGroup:

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in Visual Basic

DOC-SUMMARY-TAG-CLOSE

```vbnet
With C1Chart3D1.ChartGroups(0).ChartData.SetGrid
  .RowCount = 4
  .Item(0, 3) = 5.17
  .Item(1, 3) = 5.84
  .Item(2, 3) = 6.33
End With
```

DOC-DETAILS-TAG-CLOSE

DOC-DETAILS-TAG-OPEN

DOC-SUMMARY-TAG-OPEN

To write code in C#

DOC-SUMMARY-TAG-CLOSE

```csharp
C1Chart3D1.ChartGroups[0].ChartData.SetGrid.RowCount = 4;
C1Chart3D1.ChartGroups[0].ChartData.SetGrid[0,3] = 5.17;
C1Chart3D1.ChartGroups[0].ChartData.SetGrid[1,3] = 5.84;
C1Chart3D1.ChartGroups[0].ChartData.SetGrid[2,3] = 6.33;
```

DOC-DETAILS-TAG-CLOSE

### New columns can be added in much the same way:

Set the [ColumnCount](/componentone/api/win/online-chart3d/dotnet-framework-api/C1.Win.C1Chart3D.4.8/C1.Win.C1Chart3D.Chart3DDataSetGrid.ColumnCount.html) property to the new number of columns.

If the data is irregularly-grid, set the [ColumnDeltaArray](/componentone/api/win/online-chart3d/dotnet-framework-api/C1.Win.C1Chart3D.4.8/C1.Win.C1Chart3D.Chart3DDataSetIrGrid.ColumnDeltaArray.html) property for the space between a new column and its predecessor.

Set the Item property for each of the new points.

## See Also

[Working with Point Data](/componentone/docs/win/online-chart3d/3ddata/workingwithpointdata)