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

[Solved] ActiveRecord in RadGridView

1 Answer 97 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
veena
Top achievements
Rank 1
veena asked on 07 Apr 2009, 09:27 AM

How to find the ActiveRecord of the RadGridView.

How can we get the ActiveRecord(selected record) from radgridview. How can we get row items in the radgridview.

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 08 Apr 2009, 01:42 PM
Hi veena,

RadGridview has two properties that you can use to get the current item - CurrentRecord which stores the current DataRecord and CurrentItem which stores the current data item.
Similarly RadGridView has SelectedItem and SelectedRecord properties that indicated the first selected item. There is also a SelectedRecords property that stores all selected records.

Unfortunately there is no way to get all row items of a grid control since it uses virtualization and only a fraction of all rows are available at any time. Nevertheless you can get access to a visiable row using our ItemsGenerator - For example you can get the first row using RadGridView.ItemsControl.ItemsGenerator.ContainerFromIndex(0).

Hope this helps.

Greetings,
Milan
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
veena
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or