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

Retrieving DataSource OnPreRender or OnItemDataBound when ObjectDataSource is used

1 Answer 177 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Stephane
Top achievements
Rank 1
Stephane asked on 02 Mar 2011, 02:10 PM
Hello,

My RadGrid is defined with several GridDropDownColumn. The GridDropDownColumns are linked to an ObjectDatasource.
<telerik:GridDropDownColumn DataField="MondayId" DataSourceID="oOdsPoste" HeaderText="Monday"
                               ListTextField="Code" ListValueField="Id" UniqueName="Monday">
                           </telerik:GridDropDownColumn>


Is there a way to retrieve all the data of the ObjectDataSource in the ItemDataBound Event of the RadGrid?

Thanks,Steven

1 Answer, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 07 Mar 2011, 01:24 PM
Hi Stephane,

You can use the Select() method of the ObjectDataSource control to receive a collection of all the data objects. Another option is to get reference to the DropDownList in the ItemDataBound event and traverse its items.

Regards,
Iana
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Grid
Asked by
Stephane
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question
or