예제 #1
0
 protected void SetRowsPerPage(int value)
 {
     RowsPerPage = value;
     RowsPerPageChanged?.Invoke(value);
     currentPage = 0;
     OnPageChanged?.Invoke(currentPage);
 }
예제 #2
0
        /// <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;
        }