Input:
Name id action
Xy. 12 passed
Vy. 11 passed
Gf. 10 failed
Gh. 56
Pr. 87
To select the action column that dont have the blank value and it should not throw error if all value is blank it should return cloned or empty datatable
Output
Name id action
Xy. 12 passed
Vy. 11 passed
Gf. 10 failed
@Demo_User
DT.AsEnumerable.Where(Function(x)Not (String.IsNullOrEmpty(x(“ColName”).ToString) or String.IsNullOrWhiteSpace(x(“ColName”).ToString))).CopyToDataTable
If Linq Query is preferred, then as @raja.arslankhan provided the Solution, but a change would be to convert the rows to an Array or List, so that you would not get the Error. Modified Expression would be the below :