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

How to get rows of specific page and update cells

2 Answers 88 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dario
Top achievements
Rank 2
Dario asked on 24 Nov 2015, 03:32 PM

Hi guys,

I don't understand how can I obtain rows of particular page (current page also), then get single cell and update it.

I would click to next page for example, view rows of this page and update specific column of these rows.

 

How can I do it?

2 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 26 Nov 2015, 09:18 AM
Hello Dario,

Thank you for writing.

RadGridView exposes two collections that contain data rows:
  • Rows - this collections contains all data rows that belong to RadGridView. Data operations such as grouping, sorting, filtering, paging etc. do not change the content of the collection or the order in which the row objects exist in the collection.
  • ChildRows. This collection 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, paging) occurs. 
Hence, in order to get the rows at the current page, you can use the ChildRows collection. Accessing rows from other pages can be achieved by the Rows collection which stores all the rows. You should use the MasterTemplate's PageIndex and PageSize properties in order to get the rows subset of a particular page.

I hope this information helps. Should you have further questions I would be glad to help.
 
Regards,
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Dario
Top achievements
Rank 2
answered on 02 Dec 2015, 02:04 PM

Yes, thank you.

I found it.

Tags
GridView
Asked by
Dario
Top achievements
Rank 2
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Dario
Top achievements
Rank 2
Share this question
or