Removing rows after specified cell

Hey @E.T.S
did you try this:
YourDataTable.AsEnumerable().Take(5).Concat(YourDataTable.AsEnumerable().Skip(5).Where(Function(row) Not row.ItemArray.All(Function(field) String.IsNullOrEmpty(field.ToString())))).CopyToDataTable()

2 Likes