int val1, val2; int.TryParse(e.CellValue1.ToString().Trim(), out val1); int.TryParse(e.CellValue2.ToString().Trim(), out val2); if (val1 < val2) e.SortResult = -1; else if (val1 == val2) e.SortResult = 0; else e.SortResult = 1; e.Handled = true;
int val1, val2; int.TryParse(e.CellValue1.ToString().Trim(), out val1); int.TryParse(e.CellValue2.ToString().Trim(), out val2); if (val1 < val2) e.SortResult = -1; else if (val1 == val2) e.SortResult = 0; else e.SortResult = 1; e.Handled = true;
转载于:https://www.cnblogs.com/Iyce/archive/2012/10/30/2745944.html