Question

*Hi I want to hide top 5 rows/top 20/bottom 5...etc. How to filter in DataView. Please someone help me out to resolve this. Thanks in advance. *

Was it helpful?

Solution

You can use Linq.Check out below linq query.

var result= dataView.ToTable().AsEnumerable().OrderBy(r => r["ID"]).Skip(5).ToList();

For more information check out following msdn link

http://msdn.microsoft.com/en-us/library/bb669073(v=vs.110).aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top