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

[Solved] Linq data source hierarchy in radGrid

2 Answers 183 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian Pratt
Top achievements
Rank 1
Brian Pratt asked on 17 Mar 2010, 09:47 PM
Are there any examples of using a LINQ data source (or Linq2SQL in code) to create a hierarchy in a RadGrid?  All the examples I have found use DataSets.

I have, for example, a User object that has Roles that are loaded with the Object.    User.Roles returns a IEnumerable list of roles that that user belongs to.

Table Structure
User <- User Roles -> Roles

Thanks,
Brian

2 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 18 Mar 2010, 09:40 AM
Hello Brian,

Bellow is example of RadGrid hierarchy with LinqDataSource controls:
http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/linqdatasource/defaultcs.aspx

Greetings,
Nikolay
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
Princy
Top achievements
Rank 2
answered on 18 Mar 2010, 09:44 AM
Hi,

Please refer to the link below :
LINQ To SQL - binding and manual CRUD operations
http://www.telerik.com/help/aspnet-ajax/grdlinqtosqlbindingcrudoperations.html

In the case  of hierarchy for manual binding you can make use of the OnDetailTableDataBind  event to set the datasource of the child grid

Princy
Tags
Grid
Asked by
Brian Pratt
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Princy
Top achievements
Rank 2
Share this question
or