Delete rows in linq

Hi Team,

I need to delete row in linq if name columns contains any comma,

Aware that it can be achieved using filter datatable activity but wish to know how to do in linq query



@Ula Can you try this Query Using Assign :
Let’s say you have the Datatable as DT, Then ,

DT = DT.AsEnumerable().Where(Function(row) Not(row(“Name”).ToString.Trim.Contains(","))).CopyToDataTable

DataTableVar = DataTableVar.AsEnumerable.Where(Function(row) Not row(“Name”).ToString.Contains(“keyword”) ).CopyToDataTable

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