This is a migrated thread and some comments may be shown as answers.

Get rowcount of custom filtered items

2 Answers 406 Views
GridView
This is a migrated thread and some comments may be shown as answers.
tang
Top achievements
Rank 1
tang asked on 06 Nov 2018, 04:01 AM

hi expers:

             when i filtered the gridrows,i dont know the count of the filtered rows.

             by the way,i use paged gridview,and i only know how many pages and pagesize 

             the property 'Childrows' always gives the pagesize of the gridview .

             if if count the rows while filtering(the event CustomFiltering). the counts some times go wrong.

             best wishes

 

 

 

2 Answers, 1 is accepted

Sort by
0
tang
Top achievements
Rank 1
answered on 06 Nov 2018, 04:48 AM

thanks all :

     i got the answer. this.radGridView1.MasterTemplate.DataView.ItemCount;

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 06 Nov 2018, 08:43 AM
Hello, Tang, 
  
I am glad that you have found the suitable answer for your case.

Note that RadGridView exposes two collections that contain data rows:
- Rows - contains all data rows that belong to RadGridView. Data operations such as grouping, sorting, filtering, etc. do not change the content of the collection or the order in which the row objects exist in the collection.
- ChildRows - returns the data rows that are currently represented by RadGridView in the order in which they appear. The collection is modified every time a data operation (grouping, sorting, filtering) occurs. 

I hope this information helps. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
tang
Top achievements
Rank 1
Answers by
tang
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or