Smartsheet.Api.Internal.SheetRowResourcesImpl.UpdateRowsAllowPartialSuccess C# (CSharp) Method

UpdateRowsAllowPartialSuccess() 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?allowPartialSuccess=true

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 UpdateRowsAllowPartialSuccess ( long sheetId, IEnumerable rows ) : BulkItemRowResult
sheetId long the sheetId
rows IEnumerable the list of rows to update
return Smartsheet.Api.Models.BulkItemRowResult
        public BulkItemRowResult UpdateRowsAllowPartialSuccess(long sheetId, IEnumerable<Row> rows)
        {
            IDictionary<string, string> parameters = new Dictionary<string, string>();
            parameters.Add("allowPartialSuccess", "true");

            HttpRequest request = null;
            try
            {
                request = CreateHttpRequest(new Uri(this.Smartsheet.BaseURI, QueryUtil.GenerateUrl("sheets/" + sheetId + "/rows", parameters)), HttpMethod.PUT);
            }
            catch (Exception e)
            {
                throw new SmartsheetException(e);
            }

            request.Entity = serializeToEntity<IEnumerable<Row>>(rows);

            HttpResponse response = this.Smartsheet.HttpClient.Request(request);

            BulkItemRowResult bulkItemResult = null;
            switch (response.StatusCode)
            {
                case HttpStatusCode.OK:
                    bulkItemResult = this.Smartsheet.JsonSerializer.deserialize<BulkItemRowResult>(response.Entity.GetContent());
                    break;
                default:
                    HandleError(response);
                    break;
            }

            Smartsheet.HttpClient.ReleaseConnection();

            return bulkItemResult;
        }