Pregunta

*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. *

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top