How to filter data table based on string. Facing problem with datatype

Hi,

How about using LINQ as the following?

arrDr = dt.AsEnumerable.Where(Function(r) r("ColumnName").ToString=yourString).ToArray()

Check if arrDr has datarow

Then

dtResult = arrDr.CopyToDataTable

note: arrDr is datarow array type

Regards,

1 Like