在SQL语句筛选的时候多加一列,用于排序。
例如:
select Percent as strPercent,cast(Percent as int) as intPercent
from Table.
那么在DataSet中会自动生成一列intPercent为int的.
在DataView.SortExpression = "intPercent "; //而不是 "strPercent ";
例如:
select Percent as strPercent,cast(Percent as int) as intPercent
from Table.
那么在DataSet中会自动生成一列intPercent为int的.
在DataView.SortExpression = "intPercent "; //而不是 "strPercent ";