CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 2/10/2008 11:34:17 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 198 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
pepejose63@hotm
Asp.Net User
How to populate a treeview using linq query?2/10/2008 11:34:17 AM

0/0

Hi everyone,

I have a linq query with the needed results abd need to display the results using a treeview, but the treeview needs IHierarchicaldDataSource or IHierarchicalEnumerable.

Here is my linq code:

DataContext_SecurityDataContext db = new DataContext_SecurityDataContext();

var roles = from r in db.aspnet_Roles

select new {r.RoleName};

How can I populate the treeview in codebehind, without usin linqdatasorce?

Thank's a lot,

/Pepe


Pepe Jose
Newbie@C#.Net
Amanda Wang - M
Asp.Net User
Re: How to populate a treeview using linq query?2/13/2008 5:32:22 AM

0/0

Hi,

Use linq to populate a treeview just like populate the treeview from the database.

About how to populate a treeview from the database, you can refer this codeproject article: http://www.codeproject.com/KB/tree/TreeViewWithDatabase.aspx

You can also refer this article, it talks how to populate menu from database, but it give to some good suggestion: http://aspalliance.com/822

 

Hope it helps.


Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Yours sincerely,
Amanda Wang
Microsoft Online Community Support
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Mastering Microsoft Visual Basic 2008 Authors: Evangelos Petroutsos, Mark Ridgeway, Pages: 1118, Published: 2008
Programming C# 3.0 Authors: Jesse Liberty, Donald Xie, Pages: 607, Published: 2007
Learning C# 3.0: Get Started With C# 3.0 2008 and .NET Programming Authors: Jesse Liberty, Brian MacDonald, Pages: 576, Published: 2008
ASP.NET 3.5 For Dummies Authors: Ken Cox, Pages: 404, Published: 2008

Web:
How to populate a treeview using linq query? - ASP.NET Forums I have a linq query with the needed results abd need to display the results using a treeview, but the treeview needs ...
ASP.NET.4GuysFromRolla.com: Working with XML Data Using LINQ, a ... Apr 23, 2008 ... Populating a TreeView Control with the XML Data .... Now that we have crafted the LINQ query to retrieve those employees that belong to the ...
Populate TreeView using WebService IEnumerable results = query.EndExecute(iar); ... I have posted a blog that explains how to populate RadTreeView using a WebService and little bit of LINQ. You can find the article here : Populating TreeView from WCF Service ...
Load Treeview From SQL Query - ng.asp-net-forum ... I want to populate a treeview with the Name of the emplyee and with the .... Load treeview using Linq to SQL - MSDN Forums How can I load ...
C# Tutorials - Using LINQ In C# Part I | DreamInCode.net Nov 18, 2008 ... Now lets take a look at using LINQ to query an object, in this case a Clients class we .... Populating Tree View nodes from sql server 2000 ...
Treeview Datasource for Linq to Entities versus a SQL Command in ... Dec 31, 2008 ... Treeview Datasource for Linq to Entities versus a SQL Command in ... the differences between populating a Treeview using Linq to Entities, ... Our GetAllMenusQueryString() looks like this simply returns our query string: ...
Populate Treeview control from an XML file in C#.net Oct 21, 2008 ... Article Discussion: Populate Treeview control from an XML file in C#.net ... Silverlight WPF WCF WWF LINQ. JavaScript AJAX ASP.NET XAML ... Implementing sorting in SQL query without using dynamic query. ...
CodeProject: An introduction to LINQ for db4o. Free source code ... Apr 28, 2008 ... This LINQ query is using a subquery for selecting the list of employees ..... Populating a treeview with data is usually quite some work. ...
SQL XML output to populate a treeview I'm trying to fill a treeview using a stored procedure that retun a XML file. .... using System.Xml.Linq;. namespace www2008.Components.Controls ... I tried the FOR XML, but it doesn't seem to work with the recursive query. Any ideas? ...
Mitsu's blog : Playing with Linq grouping: GroupByMany ? To do this using Linq you just have to build a new Linq query on our first .... Some hierarchical controls like the TreeView are using this template to build ... in memory but I am using a Linq to Sql query to populate my collection. ...




Search This Site:










css disable with membership?

get logged in users location by thier ip address

replace text in emaildefinition--txt file

create user with custom membership provider

error regarding web.config file while using forms authentication on a server.

having single login within applications in asp.net

redirect to _parent window after auth cookie expires

how to use authorization and roles?

login page don't save username

username and password

username with windows authentication

urgent - cannot load pics? authentication required?!

httpwebrequest and forms authentication

lookup users in group from active directory

rolegroups not working as advertised

membership forenkey relation

moving from http to https and back again

how to disable resetting password in passwordrecovery control

retrieve guid of created user?

form mail field in "loginview" that also sends user id

failure to login with masterpage

createuserwizard problem

membership provider name error

using sha1 encryption in web.config for passwords

retrieve userid with validateuser

iis 6.0 authentication question...app pool configured identity?

how do i: secure my site using membership and roles?

web forms authentication....

accessing registry and/or env. var. in a webservice

problems hashing passwords

  Privacy | Contact Us
All Times Are GMT