private static bool ValidateCurrentPageIndex(object value) { int val = (int) value; if (val < 0) { return false; } return true; }