Skip to content

Cannot "AddRow" to table after control loop adding columns #10

@bpmcgill

Description

@bpmcgill

Information

  • OS: Windows
  • Version: 0.49.1
  • Terminal: Windows Terminal
  • IDE: Visual Studio 2022 Professional & Enterprise

Describe the bug
When I try to add subsequent rows by using the AddRow() method for the table, the IDE tells me that "'Table' does not have a definition for 'AddRow' and the best extension method overload 'GridExtensions.AddRow(Grid, params string[])' requires a receiver of type 'Spectre.Console.Grid'". I suspect that this is happening because not all of the parameters I have entered are of type string, in which case the documentation is not really clear as to what is expected.

To Reproduce

  1. Create a new table
  2. Add some columns,
  3. Add a row with a string and some integers.
var table = new();

table.AddColum("Column 1");
table.AddColum("Column 2");

table.AddRow("I am a string", 1);
table.AddRow("I am also a string", 2);

Expected behavior
I would expect that either the documentation makes clear that Only string values are accepted in the method -or- that the method would automatically handle types that are easily converted to string (double, float, int, etc...)

Please upvote 👍 this issue if you are interested in it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions