I want to sort a DataGridView by columns.
I m using SQL to fill my DataTable, to simplify lets assume that the query is :
SELECT X, Y, Z
FROM Table
After that, I initialize the DataGridView DataSource :
myDataGridView.DataSource = myDataTable
In this case, when i click on the column head of the DataGridView, it works just fine. But when I try to decode one filed, the exception bellow occures :
System.ArgumentException: [DECODE(X) is not a valid string input sorting....
The query that raises the issue :
SELECT DECODE(X, '0', 'No', '1', 'Yes'), Y, Z
FROM Table
Any Ideas Please ?