MultiColumnSort GetSortedView Method CleanCode C# Libraries v1.2.03 API
Generates a sorted view of a DataGridView based on a query.

Namespace: CleanCode.Data
Assembly: CleanCode (in CleanCode.dll) Version: (1.2.03)

public DataView GetSortedView(
	string query

Return Value

Returns a OnlineDataView sorted per the specified query.

OnlineSystem ArgumentException If no 'ORDER BY' clause is found or if there is any compound name in the clause that does not have an alias to a simple name.
OnlineSystem IndexOutOfRangeException If an expression in the order by clause does not match a column name in the DataGridView. Note that most SQL interpreters will flag this as an error first. The only way this error will manifest is if you load the DataGridView without running it through a SQL interpreter (as when loading from a file, for example).

See the class description for details.
See Also