UpdateRows() public method

Updates cell values in the specified row(s), expands/collapses the specified row(s), and/or modifies the position of specified rows (including indenting/outdenting).

It mirrors To the following Smartsheet REST API method: PUT /sheets/{sheetId}/rows

If a row’s position is updated, all child rows are moved with the row.
if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public UpdateRows ( long sheetId, IEnumerable rows ) : IList
sheetId long the sheetId
rows IEnumerable the list of rows to update
return IList
Example #1
0
        public virtual void TestUpdateRows()
        {
            server.setResponseBody("../../../TestSDK/resources/updateRows.json");

            Cell         cell1 = new Cell.UpdateCellBuilder(117, true).Build();
            Cell         cell2 = new Cell.UpdateCellBuilder(343, 99999999).Build();
            IList <Cell> cells = new List <Cell> {
                cell1, cell2
            };

            Row row  = new Row.UpdateRowBuilder(65654654).SetLocked(true).SetExpanded(true).SetCells(cells).Build();
            Row row2 = new Row.UpdateRowBuilder(4554684).SetToBottom(true).SetExpanded(false).Build();

            IList <Row> rows = sheetRowResource.UpdateRows(123, new List <Row> {
                row, row2
            });

            Assert.AreEqual(rows[1].ParentRowNumber, 1);
            Assert.AreEqual(rows[1].ParentId, 4624744004773764);
            Assert.AreEqual(rows[1].Expanded, true);
            Assert.AreEqual(rows[1].CreatedAt.Value.ToString(), DateTime.Parse("2015-01-09T11:41:55-08:00").ToString());
            Assert.AreEqual(rows[1].Cells[1].ColumnType, ColumnType.PICKLIST);
            Assert.AreEqual(rows[1].Cells[1].Value, rows[1].Cells[1].DisplayValue);
        }