Extensions for the System.Data.DataTable class.
public static class DataTableExtensions
DataTable FilterTable(this DataTable dataTable, string filterExpression, string sortExpression)Summary: Filters the table.
Parameters:
dataTable- The data table.
filterExpression- The filter expression.
sortExpression- The sort expression.
Dictionary<string, int> GetGroupCount(this DataTable dataTable, string countOnColumn)Summary: Gets the group count.
Parameters:
dataTable- The data table.
countOnColumn- The count on column.
DataTable SortTable(this DataTable dataTable, string sortOnColumn, SortDirectionType sortDirection)Summary: Sorts the table.
Parameters:
dataTable- The data table.
sortOnColumn- The sort on column.
sortDirection- The sort direction.
List<T> ToCollection(this DataTable dataTable)Summary: Toes the collection.
Parameters:
dataTable- The data table.Returns: The list of T.
XPathNodeIterator ToXPathNodeIterator(this DataTable dataTable)Summary: Convert to XPathNodeIterator from a DataTable.
Parameters:
dataTable- The data table.