Hi, I have a table called TABLE1 with below columns,
COLUMN1 COLUMN2
aaa 111
bbb 555
aaa 222
bbb 777
ccc 888
aaa 999
I want to group them based on COLUMN1, like:
aaa 111
aaa 222
aaa 999
bbb 555
bbb 777
ccc 888
Is there a way to do it?
Gokul001
(Gokul Balaji)
2
HI @manojj.yadav
Check out this expression
DtRead.AsEnumerable().OrderBy(Function (row) row("Column1").ToString).Select(Function (row) row).ToArray.CopyToDatatable()
Check out this Video link
Regards
Gokul
Sure, will checkout and see.
ppr
(Peter Preuss)
5
Currently the output looks like only sorted. So Goku shared some approaches with you.
- LINQ
- Sort DataTable Activity
…
When it is about forming groups we can do with a group by
1 Like
Gokul001
(Gokul Balaji)
6
Hi @manojj.yadav
Check out this thread for group by expression
system
(system)
Closed
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.