Beispiel #1
0
        /// <summary>
        /// On sorting event.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void grid_Sorting(object sender, GridViewSortEventArgs e)
        {
            PagingGridView grid = (PagingGridView)sender;

            grid.DataSource = GetDataPage(grid.PageIndex, grid.PageSize, grid.OrderBy);
            grid.DataBind();
        }
Beispiel #2
0
        /// <summary>
        /// Set grid tool tip.
        /// Something like :Nr. total de inregistrari:{0} ; Nr.pagini:{1}
        /// Set also RowsCount.
        /// </summary>
        /// <param name="grid"></param>
        /// <param name="where"></param>
        private string SetWebGridToolTip(PagingGridView grid)
        {
            double totalRows = GetRowCount();

            grid.VirtualItemCount = (int)totalRows;
            double numberOfPages = Math.Ceiling(Convert.ToDouble(totalRows / grid.PageSize));

            grid.RowsCount = totalRows;

            return(String.Format("Nr. total de inregistrari:{0} ; Nr.pagini:{1}", totalRows, numberOfPages));
        }