Reputation: 57
I have a sorted csv file. How to read just rows with ordered value and write them to datagridview.For example read just rows where value of Age is 22. the file looks like:
ID Name Surname Age Salary
1 John Asben 33 1000
2 Adam Smith 22 1200
3 Amanda J 22 2000
4 George Villis 36 2300
Upvotes: 0
Views: 1370
Reputation: 2843
About reading CSV files in .NET: Reading a CSV file in .NET?
Depending on the CSV parser type and the classes you'll get the CSV data in, you could apply a filter while parsing, apply a filter on the parsed data or add a View filter to the grid. I'm sure there are also other methods.
Upvotes: 1