Linq query to find a empty cell in a datatable

Hi, I have a datatable, I need to check if the values in State Column are empty. If it is empty for any row, I need to add to it a new datatable. Please suggest me linq queries or any method other than for each activity.
image

Hi @Tanmay_V_Chetule

You can use the following query to achieve this:

dt_emptyTable = dt_originalTable.AsEnumerable.Where(Function(row) row("State").ToString.Trim.Equals(String.Empty)).CopyToDataTable

Hope this helps,
Best Regards.

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