Search data from DataTable object in C#
How search data from DataTable object in C# .suppose we have a DataTable in C# And that DataTable has data .Its Data Column is id ,CustomerName,Age etc.DataTable has id from 1 to 50 with customerName and age then how we search data of id 20 to 25 ???


Pranay RanaRank #735 · 3.2K reputationPosted Apr 22, 2015, 1:10 AM EDT
DataTable Customer= ds.Tables["Customer"];
List
IEnumerable
from cust in Customer.AsEnumerable()
where ids.Contains( Convert.ToInt32(cust.Field
select cust;
Pranay RanaRank #735 · 3.2K reputationPosted Apr 22, 2015, 1:18 AM EDT
Khargesh RajputRank #616 · 3.9K reputationPosted Apr 22, 2015, 12:27 AM EDT
then dt.Select("id in(20,25)");
also you can use
Dataview to filter record
Nanhe SiddiqueRank #1,103 · 1.7K reputationPosted Apr 22, 2015, 12:40 AM EDT
}
if this helpful marks answer