Merge pull request #4540 from kumpera/android-changes-part1
[mono.git] / mcs / class / System.Web / System.Web.UI.WebControls / FormViewRow.cs
index 3d941f2f3e70c84490f4f9060a536ab101b68655..def2c43e5763c5bb655e0a37a4c1bb9fe5429474 100644 (file)
@@ -4,7 +4,7 @@
 // Authors:
 //     Lluis Sanchez Gual (lluis@novell.com)
 //
-// (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2004-2010 Novell, Inc (http://www.novell.com)
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
 //
 
-#if NET_2_0
-
 using System;
 using System.Collections;
 using System.ComponentModel;
@@ -45,10 +42,13 @@ namespace System.Web.UI.WebControls
                int rowIndex;
                DataControlRowState rowState;
                DataControlRowType rowType;
-               
-               public FormViewRow (int rowIndex, DataControlRowType rowType, DataControlRowState rowState)
+               internal bool RenderJustCellContents {
+                       get;
+                       set;
+               }
+               public FormViewRow (int itemIndex, DataControlRowType rowType, DataControlRowState rowState)
                {
-                       this.rowIndex = rowIndex;
+                       this.rowIndex = itemIndex;
                        this.rowType = rowType;
                        this.rowState = rowState;
                }
@@ -76,7 +76,16 @@ namespace System.Web.UI.WebControls
                        }
                        return false;
                }
+               protected internal override void Render (HtmlTextWriter writer)
+               {
+                       if (!RenderJustCellContents) {
+                               base.Render (writer);
+                               return;
+                       }
+
+                       foreach (TableCell cell in Cells)
+                               cell.RenderContents (writer);
+               }
        }
 }
 
-#endif