Author: igorz
Date: 2007-06-24 03:51:31 -0400 (Sun, 24 Jun 2007)
New Revision: 80611

Modified:
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs
Log:
2007-06-24 Igor Zelmanovich <[EMAIL PROTECTED]>

        * GridView.cs: fixed AllowPaging feature:
        When the AllowPaging is true the GridView control should automatically 
        hide the pager row when the data source contains fewer than 2 records.  
        patch Patch submitted by Dumitru Ban [EMAIL PROTECTED]  



Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2007-06-24 04:45:12 UTC (rev 80610)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2007-06-24 07:51:31 UTC (rev 80611)
@@ -1,3 +1,10 @@
+2007-06-24 Igor Zelmanovich <[EMAIL PROTECTED]>
+
+       * GridView.cs: fixed AllowPaging feature:
+       When the AllowPaging is true the GridView control should automatically 
+       hide the pager row when the data source contains fewer than 2 records.  
+       patch Patch submitted by Dumitru Ban [EMAIL PROTECTED]  
+
 2007-06-20  Marek Habersack  <[EMAIL PROTECTED]>
 
        * WebControl.cs: if savedState is a Triplet, take the actual state

Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs    
2007-06-24 04:45:12 UTC (rev 80610)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs    
2007-06-24 07:51:31 UTC (rev 80611)
@@ -1297,7 +1297,7 @@
                                object obj = enumerator.Current;
                                
                                if (list.Count == 0) {
-                                       if (showPager && PagerSettings.Position 
== PagerPosition.Top || PagerSettings.Position == PagerPosition.TopAndBottom) {
+                                       if (showPager && 
(PagerSettings.Position == PagerPosition.Top || PagerSettings.Position == 
PagerPosition.TopAndBottom)) {
                                                topPagerRow = CreatePagerRow 
(fields.Length, dataSource);
                                                OnRowCreated (new 
GridViewRowEventArgs (topPagerRow));
                                                ContainedTable.Rows.Add 
(topPagerRow);
@@ -1355,7 +1355,7 @@
                                        OnRowDataBound (new 
GridViewRowEventArgs (footerRow));
                                }
 
-                               if (showPager && PagerSettings.Position == 
PagerPosition.Bottom || PagerSettings.Position == PagerPosition.TopAndBottom) {
+                               if (showPager && (PagerSettings.Position == 
PagerPosition.Bottom || PagerSettings.Position == PagerPosition.TopAndBottom)) {
                                        bottomPagerRow = CreatePagerRow 
(fields.Length, dataSource);
                                        OnRowCreated (new GridViewRowEventArgs 
(bottomPagerRow));
                                        ContainedTable.Rows.Add 
(bottomPagerRow);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to