FILTER AND REMOVE DATA TABLE REGARDING


This is sample data in data table i want unique company name row only how to get any one help pls

Hi @BHUVAN,

Please refer to this post:

Hey

dtResult.DefaultView.ToTable(true, "yourColumnName")

Regards

It’s giving me the unique one column value only , i want unique Coulmn value plus respective Coulmn value also, how to get it

dtResult.DefaultView.ToTable(True, "CompanyName", "Nerchand", "Status", "Amound", "Currency")

Just append all your columns separated by ,

Regards!

Hi @BHUVAN

Try with this LINQ expression

(From d In DtInput.AsEnumerable
Group d By k=d("Companyname").toString.Trim Into grp = Group
Let ra = New Object(){k,grp.First()(1),grp.First()(2),grp.First()(3),grp.First()(4)}
Select r = DtOutput.Rows.Add(ra)).CopyToDataTable

Regards
Gokul

1 Like

Thank you so much :dizzy:

Your welcome, please close the topic marking as solution

Regards!

1 Like

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