-
-
Save anonymous/de43f6bb97843de388d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static XElement XCreateTable(this HtmlHelper helper, IEnumerable<XAttribute> attributes = null, object tHeadData = null, IEnumerable<Tuple<XAttribute[], IEnumerable<object>>> tRowsContent = null) | |
{ | |
return new XElement( | |
"table", | |
attributes, | |
new XElement("thead", tHeadData), | |
new XElement("tbody", tRowsContent.Select(helper.XCreateTableRow)); | |
} | |
public static XElement XCreateTableRow(this HtmlHelper helper, Tuple<XAttribute[], IEnumerable<object>> tRowData) | |
{ | |
return new XElement("tr", tRowData.Value1, tRowData.Select(helper.XCreateTableCell)); | |
} | |
public static XElement XCreateTableCell(this HtmlHelper helper, params object[] content) | |
{ | |
return new XElement("td", content); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment