سؤال

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

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top