How to sort Column A, then sort Column B grouped under the same value in Column A?

Given:
Datatable with 2 columns:
CA | CB
1 | B
2 | B
2 | A
1 | C
1 | A

Problem:
Sort the two columns like below:
CA | CB
1 | A
1 | B
1 | C
2 | A
2 | B

Please help!

Thank you!

(From x In datatablevariable.AsEnumerable()
Order By convert.ToInt16(x("Column Name ")),convert.ToString(x("Column Name "))
Select x).CopyToDataTable

6 Likes

worked like a charm! thanks Vijay!!

Glad it Worked . Cheers
Happy Automating :+1:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.