Data Table sort some columns

I have one table but I want sort two column.

Name and SID column.

My input data table:

My expected output:

We assume that Excel is read into a datatable - dtData

For sorting we do have more options like

Sort DataTable Activity

LINQ:
Assign Activity:
dtSorted =

(From d in dtData.AsEnumerable
Let s = d("Name").toString.Trim
Let n = d("SID").toString.Trim
Order by s, CInt(n)
Select r = d).CopyToDataTable
1 Like

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