Click here to Skip to main content
15,911,785 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
my data table is like


BUS-1(0R02 BY 6530) ag square 01:00:00 10:00:00
BUS-1(0R02 BY 6530) ag square 02:00:00 03:00:00
BUS-1(0R02 BY 6530) red cross bhavan 01:00:00 04:00:00

i want datatable like

BUS-1(0R02 BY 6530) ag square 01:00:00 10:00:00
02:00:00 03:00:00

BUS-1(0R02 BY 6530) red cross bhavan 01:00:00 04:00:00
Posted
Updated 31-Aug-13 0:59am
v4
Comments
abbaspirmoradi 31-Aug-13 6:44am    
look at this link http://www.codeproject.com/Answers/643855/How-to-display-the-data-in-gridview-using-GROUPING#answer1

Perfect, you have our permission, go ahead.

Since you didn't ask any question, it is difficult to give you a better answer.

I strongly recommend you to read:
How to ask a question[^] and What have you tried?[^]

P.S. Written as solution to avoid this "question" to be in the unanswered list
 
Share this answer
 
You need to use Linq and GroupBy to do that.
See some examples and try for yours:
Use LINQ to group data from DataTable[^]
LINQ - Grouping Operators[^]
 
Share this answer
 
Comments
Joezer BH 1-Sep-13 8:04am    
5ed!
ridoy 1-Sep-13 8:17am    
Thank you,:)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900