Explorar o código

* FormView.cs: use TableStyle for ControlStyle

svn path=/trunk/mcs/; revision=63153
Andrew Skiba %!s(int64=19) %!d(string=hai) anos
pai
achega
2a66bedaf6

+ 4 - 0
mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog

@@ -1,3 +1,7 @@
+2006-07-30 Andrew Skiba <[email protected]>
+
+	* FormView.cs: use TableStyle for ControlStyle.
+
 2006-07-30 Andrew Skiba <[email protected]>
 
 	* FormView.cs: save DataKeyNames and DefaultMode in ControlState.

+ 8 - 9
mcs/class/System.Web/System.Web.UI.WebControls/FormView.cs

@@ -537,13 +537,11 @@ namespace System.Web.UI.WebControls
 		[WebCategoryAttribute ("Appearance")]
 		[DefaultValueAttribute (GridLines.None)]
 		public virtual GridLines GridLines {
-			get {
-				object ob = ViewState ["GridLines"];
-				if (ob != null) return (GridLines) ob;
-				return GridLines.None;
+			get {
+				return ((TableStyle) ControlStyle).GridLines;
 			}
-			set {
-				ViewState ["GridLines"] = value;
+			set {
+				((TableStyle) ControlStyle).GridLines = value;
 			}
 		}
 
@@ -818,10 +816,11 @@ namespace System.Web.UI.WebControls
 			base.EnsureDataBound ();
 		}
 	
-		[MonoTODO]
 		protected override Style CreateControlStyle ()
-		{
-			return base.CreateControlStyle ();
+		{
+			TableStyle style = new TableStyle (ViewState);
+			style.CellSpacing = 0;
+			return style;
 		}
 		
 		protected override int CreateChildControls (IEnumerable data, bool dataBinding)