Recommended approach for displaying list of key value pairs? #1082
|
In html where having the definition list to display key value pair and even key and list of values. What are you typically using in this case? |
Answered by
patriksvensson
Nov 22, 2022
Replies: 2 comments 1 reply
|
@orjan I haven't compiled the example below, but something like this should work. // Create table
var table = new Table();
table.AddColumn("Key");
table.AddColumn("Value");
// Add a row with key/value
table.AddRow("Foo", "Bar");
// Add a new row with multiple rows as values
table.AddRow(
new Text("Qux"),
new Rows(
new Text("First"),
new Text("Second")));
// Render table
console.Write(table); |
1 reply
Answer selected by
orjan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

@orjan I haven't compiled the example below, but something like this should work.
Instead of
Rowsyour could of course use anyIRenderable.