protected void SetRowsPerPage(int value) { RowsPerPage = value; RowsPerPageChanged?.Invoke(value); currentPage = 0; OnPageChanged?.Invoke(currentPage); }
/// <summary> /// 切换每页行数 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cbeRows_EditValueChanged(object sender, EventArgs e) { RowsPerPage = int.Parse(cbeRows.Text); _Current = (int)Math.Ceiling((decimal)(FocusedRowIndex + 1) / RowsPerPage) - 1; Refresh(); if (!_IsLoad) { RowsPerPageChanged?.Invoke(this, null); } _IsLoad = false; }