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
Santhosh Kumar Nallavelli
NA
28
28.7k
Binding Linq main Query and sub query results to gridview
Aug 21 2012 1:52 AM
Hi all ,
I have a Linq Query in the foloowing way .
var query= from p in dt.AsEnumerable() group p by p["A"].ToString() into g select new
{
city = g.Key,
sub_rows = (from q in g
select new
{
value1= q["B"].ToString() ,
value2 = q["C"].ToString(),
value3= q["D"].ToString(),
}).ToList()
};
here A,B,C,D are data columns in my datatable.
I want to assign the results to gridview. But when i tried it is assigning only main query results i.e, here the city(key value) but not the inner query results (sub_rows .) '
Please suggest me.
Desired Sample output :
group1 name (Key value)
Corresponding rows ......
group2 name
Corresponding rows ......
Reply
Answers (
4
)
A private constructor can be called outside its class but how??????
JIT ERROR