hey guys,
Tried this method In_BaseDataTable.Rows.Cast(Of DataRow)().Where(Function(row) Not row.ItemArray.All(Function(field) field Is DBNull.Value Or field.Equals(“”))).CopyToDataTable()
i’m getting erro like ‘Datarow’ is Ambigiuous imported from namespaces or types ‘xceed.wpf.datagrid.,system.datatable’
Hi
we can do this with a select method itself like tihs
yourdatatable = yourdatatable.Select("[yourcolumnname] <> ‘’ ").CopyToDatatable()
this will fetch all the rows which are not blank
Cheers @Pradeep_Shiv
so here we are remove only one particular column empty rows??
what if i want more than 3-4
no its like one column has empty row value, all the columns which are adjacent to it will get deleted as well right
Cheers @Pradeep_Shiv
Assign: Cannot perform ‘<>’ operation on System.DateTime and System.String. @Palaniyappan
may i know the datatype of that column
this would work actually
for more details on ths
Hi All,
Use below code to remove empty row from the table.
DataTable name->DataTableName
Use assign activity
DataTableName=DataTableName.Rows.Cast(Of DataRow)().Where(Function(row) Not row.ItemArray.All(Function(field) field Is DBNull.Value Or field.Equals(""))).CopyToDataTable()
Re-usable Component pass Parameter as datatable you will get the answer.
RemoveEmptyRows.xaml (8.5 KB)
Remove rows based on particular column is empty.
DataTableName.Select("Convert(column3, System.String)< >''"…
Cheers @Pradeep_Shiv