datagridview 按数字 排序
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;