2003-01-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Tue, 7 Jan 2003 03:44:47 +0000 (03:44 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Tue, 7 Jan 2003 03:44:47 +0000 (03:44 -0000)
* DataList.cs: fixed IRepeatInfoUser.GetItemStyle.

svn path=/trunk/mcs/; revision=10230

mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
mcs/class/System.Web/System.Web.UI.WebControls/DataList.cs

index a55e3450bcf89c012ae1421956236f150a346850..9bf9e1c3f584a7e7b48b21f15a6979f30e70e5b3 100644 (file)
@@ -1,3 +1,7 @@
+2003-01-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * DataList.cs: fixed IRepeatInfoUser.GetItemStyle.
+
 2002-12-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
 
        * BaseValidator.cs: return an empty string in GetControlValidationValue
index 704284350899e210bda3d81e54ca79f52d1b9af2..2a69a90f7825df3750695258db6e8c59ef750e94 100755 (executable)
@@ -868,10 +868,11 @@ namespace System.Web.UI.WebControls
 
                Style IRepeatInfoUser.GetItemStyle (ListItemType itemType, int repeatIndex)
                {
-                       if (ControlStyleCreated && GetItem (itemType, repeatIndex) != null)
-                               return ControlStyle;
+                       DataListItem item = GetItem (itemType, repeatIndex);
+                       if (item == null || !item.ControlStyleCreated)
+                               return null;
 
-                       return null;
+                       return item.ControlStyle;
                }
        }
 }