Class DataTableExtensions
Static and extension methods for the DataTable object
Inheritance
System.Object
Namespace: Umbraco.Extensions
Assembly: Umbraco.Core.dll
Syntax
public static class DataTableExtensions
Methods
View SourceAddRowData(List<Tuple<IEnumerable<KeyValuePair<String, Object>>, IEnumerable<KeyValuePair<String, Object>>>>, IEnumerable<KeyValuePair<String, Object>>, IEnumerable<KeyValuePair<String, Object>>)
Helper method to deal with these ugly objects
Declaration
public static void AddRowData(List<Tuple<IEnumerable<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>>> rowData, IEnumerable<KeyValuePair<string, object>> standardVals, IEnumerable<KeyValuePair<string, object>> userVals)
Parameters
Type | Name | Description |
---|---|---|
List<Tuple<IEnumerable<KeyValuePair<System.String, System.Object>>, IEnumerable<KeyValuePair<System.String, System.Object>>>> | rowData | |
IEnumerable<KeyValuePair<System.String, System.Object>> | standardVals | |
IEnumerable<KeyValuePair<System.String, System.Object>> | userVals |
Remarks
This is for legacy code, I didn't want to go creating custom classes for these
CreateTableData()
Helper method to return this ugly object
Declaration
public static List<Tuple<IEnumerable<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>>> CreateTableData()
Returns
Type | Description |
---|---|
List<Tuple<IEnumerable<KeyValuePair<System.String, System.Object>>, IEnumerable<KeyValuePair<System.String, System.Object>>>> |
Remarks
This is for legacy code, I didn't want to go creating custom classes for these
GenerateDataTable(String, Func<String, IEnumerable<KeyValuePair<String, String>>>, Func<IEnumerable<Tuple<IEnumerable<KeyValuePair<String, Object>>, IEnumerable<KeyValuePair<String, Object>>>>>)
Creates a DataTable with the specified alias and columns and uses a callback to populate the headers.
Declaration
public static DataTable GenerateDataTable(string tableAlias, Func<string, IEnumerable<KeyValuePair<string, string>>> getHeaders, Func<IEnumerable<Tuple<IEnumerable<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>>>> rowData)
Parameters
Type | Name | Description |
---|---|---|
System.String | tableAlias | |
Func<System.String, IEnumerable<KeyValuePair<System.String, System.String>>> | getHeaders | |
Func<IEnumerable<Tuple<IEnumerable<KeyValuePair<System.String, System.Object>>, IEnumerable<KeyValuePair<System.String, System.Object>>>>> | rowData |
Returns
Type | Description |
---|---|
System.Data.DataTable |
Remarks
This has been migrated from the Node class and uses proper locking now. It is now used by the Node class and the DynamicPublishedContent extensions for legacy reasons.