How to select rows which contains data more than 2 columns

I have data like this

image

Now What I want to do is select only those rows who contain more than 2 column data in it

So here My output should be :

image

Since Row No 2 and 3 have only 2 and 1 column data respectively they are ignored

1 Like

Hey @Ishan_Shelke

Kindly try the below,

dt_Data.AsEnumerable.Where(Function(row) row.ItemArray.Count(Function(item) not String.IsNullOrEmpty(Convert.ToString(item))) >= 2).CopyToDataTable

Thanks
#nK

1 Like

Hey!

Try like this

Use filter data table to achieve this

See the attached screenshot!

Screenshot 2022-06-28 103552

Provide the Third column

Regards,
NaNi

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