بایگانی برچسب: Paging

‫Custom Paging بهینه و غیر Declarative در DataGrid

اگر بخواهید از الگوی MVP در برنامه‌های ASP.NET استفاده کنید بایستی بتوانید همه چیز را به CodeBehind انتقال دهید. این یعنی declarative و binding تقریباً تعطیل. یکی از امکانات مهمی که این وسط از دست می‌رود، امکان Paging بهینه کنترل GridView از طریق CodeBeind است. منظور از Paging بهینه فقط نمایش pager در قسمت پایین …

‫Paging کوئری‌های SQL در NHibernate

تصور کنید تعدادی کوئری SQL دارید که می‌خواهید Paging را با استفاده از NHibernate در آنها فعال کرده و بنا به دلایلی اجازه بازنویسی آنها با دیگر APIهای NHibernate نداشته و آنها را صرفاً باید از طریق ObjectDataSaource به کنترل‌های ASP.NET بخورانید. سه راه برای انجام این کار وجود دارد. راه اول: استفاده از stored …

Paging methods

ASP.NET GridView and other similar controls that support paging needs special methods that return only the requested slice of data and  the count of total data. As I’m a lover of NHibernate/Castle ActiveRecord I have gathered paging techniques in NHibernate HQL, LINQ-to-NHibernate and Castle ActiveRecord: NHIbernate HQL: public IList GetData(int page, int pageSize, ref long …

‫Paging بدون DataSource

بیشتر کارهای کنترل‌های ASP.NET را هم می‌توان به صورت Declartive و هم در Codebehind انجام داد. یکی از این کارها عملیات Paging در GridView است. متاسفانه یک محدودیت ظریف در حالت غیر Declarative وجود دارد که کار را برای کسانی که همه کارهای کنترل‌هایشان را در Codebehind انجام می‌دهند سخت کرده است. اگر GridView را …

Castle ActiveRecord and GridView’s Paging and Sorting

Paging and sorting is a common need in ASP.NET applications. GridView itself have a default paging and sorting mechanism. Default paging has performance issues while manipulating large amounts of data. So people use a custom paging mechanism. This way they must note that only needed data must be extracted from database. For example when page …