New test.
[mono.git] / mcs / class / System.Web / System.Web.UI.WebControls / CheckBoxField.cs
index 97dbf79d363f8da59edf789ec80f79928ffe153b..0b1d08554b057ba75744454b0b4189e85bf3be87 100644 (file)
@@ -101,8 +101,9 @@ namespace System.Web.UI.WebControls {
                {
                        bool editable = (rowState & (DataControlRowState.Edit | DataControlRowState.Insert)) != 0;
                        CheckBox box = new CheckBox ();
-                       box.Enabled = editable && !ReadOnly;
-                       box.ToolTip = HeaderText;
+                       box.Enabled = editable && !ReadOnly;\r
+                       if (editable)
+                               box.ToolTip = HeaderText;
                        box.Text = Text;
                        cell.Controls.Add (box);
                }