DevExpress XtraGrid Display Count

In DevExpress XtraGrid the CustomDrawFooter event can be used to show the record count in the footer.

Example usage is shown below.

private void myListDataView_CustomDrawFooter(object sender, Views.Base.RowObjectCustomDrawEventArgs e) { e.Painter.DrawObject(e.Info); Font f = new Font(e.Appearance.Font, FontStyle.Bold); GridView view = sender as GridView; string sum = string.Format("{0}", view.DataRowCount + " RECORDS"); Point point = new Point(e.Bounds.Right - 125, e.Bounds.Top + 10); e.Graphics.DrawString(sum, f, Brushes.Black, point); e.Handled = true; }


You May Interest

DevExpress XtraGrid Selecting Only Cell on Row Click

Displaying The DevExpress XtraGrid Footer

DevExpress XtraGrid Setting Cell Text Color by Column

Setting DevExpress XtraGrid Row Height

DevExpress XtraGrid Row Header Invisible