Skip to content

AddRowObject Cannot Auto-Assign RowId and Set RowAction to Add Automatically #93

@scottolsonjr

Description

@scottolsonjr

When passing a pre-configured RowObject to AddRowObject the RowId is automatically assigned as expected, however it expects the RowAction to be set prior to adding. Likewise, when adding a RowObject without pre-configuring it does automatically set the RowAction to Add but requires that the RowId be provided.

I am proposing we add two new overloads to AddRowObject to support this.

public static IFormObject AddRowObject(IFormObject formObject)
{
   // Adds an empty RowObject with RowId automatically assigned and RowAction set to Add.
}

public static IFormObject AddRowObject(IFormObject formObject, string parentRowId)
{
   // Adds an empty RowObject with RowId automatically assigned and RowAction set to Add. Sets the ParentRowId.
}

It makes sense when passing in a complete RowObject to not assume the Add intent (e.g., arranging a unit test).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions