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

Closing DevExpress XtraGrid Group Panel

DevExpress XtraGrid Setting Color of Selected Row

DevExpress XtraGrid Column Header Height Adjustment

Setting DevExpress XtraGrid Row Height