I need to remove the row from datatable even if any column in the datatable has empty values.
For Example :
My datatable has two columns
Value Input
Dep Phase 1
Sec
Div Phase 2
Result
Value Input
Dep Phase 1
Div Phase 2
I want to remove the second row as Input column has empty values. I'm stuck with the below code.
dtTable = dtTable.Rows.Cast<DataRow>()
.Where(row => !row.ItemArray.All(field => field is DBNull || string.IsNullOrWhiteSpace(field as string))).
.CopyToDataTable();
Can anyone suggest me how this can be achieved ?
AnynotAll