Hi,
I have DataTable. That have 2 Columns. one is Element, another one is Attribute. Element Column have duplicate. but Attribute not. i want to remove Entire row if is there any duplicate in Element Column. like Follow.
| Element | Attribute |
| component/header | @[version = '1.2'] |
| component/header/title[cited = 'no'] | @[type = 'series'] |
| component/header/title[cited = 'no'] | @[level = 'Product'] |
from this table i want remove 4th row. i tried to check while adding each row by DataTable.Select. but it return an error. because the Element having single quotes. Also i tried
dt.AsEnumerable().Distinct(DataRowComparer.Default); but that's not help full. is there any idea about this.
Thanks in advance.
Amit GuptaPosted May 29, 2017, 6:34 AM
Karthi KeyanPosted May 30, 2017, 6:49 AM
Karthi KeyanPosted May 29, 2017, 8:27 AM
Amit GuptaPosted May 29, 2017, 8:04 AM
Karthi KeyanPosted May 29, 2017, 7:29 AM
Manas MohapatraPosted May 29, 2017, 6:15 AM