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

Get RadGrid dataitem for binding

1 Answer 302 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kyler
Top achievements
Rank 1
Kyler asked on 08 Feb 2008, 09:10 PM
I want to get the dataitem of the selected row in a RadGrid, then programmatically bind it to a FormView control.  I have tried...

FormView1.DataSource = RadGrid1.SelectedItems(0)
and
FormView1.DataSource = RadGrid1.SelectedItems(0).Cells
and
FormView1.DataSource = RadGrid1.SelectedItems(0).OwnerTableView.Items

But none of those expose the dataitems associated with the grid.  One other detail is that I want to bind dataitmes that might not necessarily be shown in the grid, but are included in the grid's datasource.

THanks.

1 Answer, 1 is accepted

Sort by
0
Prangadj
Top achievements
Rank 1
answered on 11 Feb 2008, 04:32 PM
I found this demo which is quite helpful and is probably the most quick and easy solution:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Programming/SelectedValue/DefaultCS.aspx

Replace the second grid with FormView control and this should filter the data in the FormView when you select item.

Prangadj
Tags
Grid
Asked by
Kyler
Top achievements
Rank 1
Answers by
Prangadj
Top achievements
Rank 1
Share this question
or