Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for html tables #1

Open
carbonrobot opened this issue Feb 17, 2013 · 2 comments
Open

Add support for html tables #1

carbonrobot opened this issue Feb 17, 2013 · 2 comments

Comments

@carbonrobot
Copy link
Owner

Initial thoughts on fluid interface

var table = new Table()
   .AddHeader(
        new HeaderRow(
            new HeaderCol().Text("Col 1"),
            new HeaderCol().Text("Col 2")
        ),
    )
   .AddBody();
<table>
    <thead>
        <tr><th></th><th></th></tr>
    </thead>
    <tbody>
        <tr><td></td><td></td></tr>
    </tbody>
</table>
@carbonrobot
Copy link
Owner Author

Simple tables should be easier to implement

var table = new Table()
    .AddRow("Data in col A1", "Data in col A2", "Data in col A3")
    .AddRow("Data in col B1", "Data in col B2", "Data in col B3");

@carbonrobot
Copy link
Owner Author

Rows should take IEnumerable<string>

var list = new List<string>();
list.AddRange(new string[] {"Data in col 1", "Data in col 2", "Data in col3"});

var table = new Table()
    .AddRow(list);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant