TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
r p
NA
343
0
How to fetch sql data and covert to jquery object?
Nov 15 2013 4:46 PM
I have the hierarchy of an organization in the SQL database. It looks like this -
Main Manager
Manager - 1
Manager - 1.1
Manager - 1.1.1
Manager - 2
Manager - 2.1
Manager - 2.1.1
Manager - 2.2
etc.
I want to fetch the values in the database and convert to a jquery object just like the example below.
How can I fetch the sql data in the database in hierarchical order and create a jquery object like in the example below?
var data = { Name: "Manager - 1",
ID: "1",
children: [ {
Name: "Manager - 1.1",
ID: "1.1",
children: [ {
Name: "Manager - 1.1.1",
ID: "1.1.1"}
]
Name: "Manager - 1.2",
ID: "1.2",
children: [ {
Name: "Manager - 1.2.1",
ID: "1"}
]
}
]
};
Reply
Answers (
7
)
Retrieve database to server login on sql server 2008
HttpContext.Current.Response.Redirect(); & Response.Redirec