[Mono-bugs] [Bug 48814][Nor] New - DataGrid does not calculate page length
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 24 Sep 2003 11:30:02 -0400 (EDT)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by ivo.haamer@101b.ee.
http://bugzilla.ximian.com/show_bug.cgi?id=48814
--- shadow/48814 2003-09-24 11:30:02.000000000 -0400
+++ shadow/48814.tmp.31107 2003-09-24 11:30:02.000000000 -0400
@@ -0,0 +1,72 @@
+Bug#: 48814
+Product: Mono/Class Libraries
+Version: unspecified
+OS: Red Hat 9.0
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: System.Web
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: ivo.haamer@101b.ee
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: DataGrid does not calculate page length
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem:
+DataGrid shows all items - from the beginning of current page to the
+bottom of the list. It doesn't use pagelenth property.
+
+
+Steps to reproduce the problem:
+1. Create IBindingList (CustomersList from MS .NET help file, create 25
+customers)
+2. Create web page with DataGrid with paging (10 items i page)
+3. Describe columns
+4. Assign datasource
+
+Actual Results:
+all 25 customers are in datagrid
+
+Expected Results:
+I want to see only first 10
+
+
+How often does this happen?
+Always
+
+Additional Information:
+Probably there is an error in
+class\System.Web\System.Web.UI.WebControls\PagedDataSource.cs
+...
+public int Count
+{
+ get
+ {
+ if(dataSource != null)
+ {
+ if(IsPagingEnabled)
+******** Probably error, must be: if( !IsPagingEnabled )*************
+ {
+ return DataSourceCount;
+ }
+ if(IsCustomPagingEnabled)
+ {
+ return pageSize;
+ }
+ if(IsLastPage)
+ {
+ return (DataSourceCount -
+FirstIndexInPage);
+ }
+ return pageSize;
+ }
+ return 0;
+ }
+}
+...