Author: igorz
Date: 2006-09-19 07:09:29 -0400 (Tue, 19 Sep 2006)
New Revision: 65630

Modified:
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs
Log:
* RadioButtonList.cs: 
make it to consider CausesValidation and ValidationGroup properties


Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2006-09-19 10:58:13 UTC (rev 65629)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2006-09-19 11:09:29 UTC (rev 65630)
@@ -1,5 +1,10 @@
 2006-09-19 Igor Zelmanovich <[EMAIL PROTECTED]>
 
+       * RadioButtonList.cs: 
+       make it to consider CausesValidation and ValidationGroup properties
+               
+2006-09-19 Igor Zelmanovich <[EMAIL PROTECTED]>
+
        * CheckBoxList.cs: 
        make it to consider CausesValidation and ValidationGroup properties
                

Modified: 
trunk/mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs     
2006-09-19 10:58:13 UTC (rev 65629)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/RadioButtonList.cs     
2006-09-19 11:09:29 UTC (rev 65630)
@@ -46,7 +46,9 @@
 #endif
        public class RadioButtonList : ListControl, IRepeatInfoUser,
                INamingContainer, IPostBackDataHandler {
+#if !NET_2_0
                bool need_raise;
+#endif
                short tabIndex = 0;
 
                public RadioButtonList ()
@@ -257,6 +259,10 @@
                        radio.AutoPostBack = AutoPostBack;
                        radio.Enabled = Enabled;
                        radio.TabIndex = tabIndex;
+#if NET_2_0
+                       radio.ValidationGroup = ValidationGroup;
+                       radio.CausesValidation = CausesValidation;
+#endif
                        radio.RenderControl (writer);
                }
 #if NET_2_0
@@ -275,9 +281,15 @@
 
                                if (i != selected) {
                                        SelectedIndex = i;
+#if NET_2_0
+                                       return true;
+#else
                                        need_raise = true;
+#endif
                                }
+#if !NET_2_0
                                return true;
+#endif
                        }
 
                        return false;
@@ -288,7 +300,14 @@
 #endif
                void RaisePostDataChangedEvent ()
                {
+#if NET_2_0
+                       if (CausesValidation)
+                               Page.Validate (ValidationGroup);
+#endif
+
+#if !NET_2_0
                        if (need_raise)
+#endif
                                OnSelectedIndexChanged (EventArgs.Empty);
                }
 

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

Reply via email to