Skip to content
Loading
  • Jignesh Kumar
    +1
    Hi Jagjit, 
    You can use linq to filter records and get Ids matching with your 2nd column. You can use string.join() function to make it comma seperated string and then you can store
    comma seperated values to database if you wish to store,
    1. string Ids = "";  
    2. var filtered = myDataTable.AsEnumerable()  
    3. .Where(r => r.Field("ID").Contains(Convert.ToString(col["ID"])));  
    4. if (filtered.FirstOrDefault() != null)  
    5. Ids += String.Join(",", filtered.Select(a => a.Field("ID")));  
    +1