Aslam Ansari
Aslam Ansari

Reputation: 21

How to count Number of Rows devexpress xtragrid

I am using Devexpress XtraGrid Control, Here I can count the number of rows in footer of grid. but for this I need to set count property of SummeryItem in grid for at least one column. I dont want to do like this.

I want count number of rows in xtraGrid without referring any one column in grid. I just want to show number of rows count. when user will filter that rows, at that time count also need to be changed.

Is there any option to show this number in Group header panel?

Upvotes: 2

Views: 15347

Answers (3)

Miha Markic
Miha Markic

Reputation: 3250

I'd use BaseView.RowCount to get the row count and draw it within CustomDrawGroupPanel event.

Upvotes: 3

Paul C
Paul C

Reputation: 4776

I don't know if this is an update but:

int i = view.SelectedRowsCount;

Upvotes: 0

Steven Evers
Steven Evers

Reputation: 17226

You can use the customsummarycalculate event to count the number of rows currently shown in the filtered collection and display it in the summary area (generally, I put that text in the summary area of the ID field for the collection I'm using - as I never have a need to put anything else there).

Upvotes: 1

Related Questions