void DisplayLink.SetInitialDisplay(PostBackValueDictionary formControlValues)
 {
     foreach (var c in controls)
     {
         DisplayLinkingOps.SetControlDisplay(c, controlsVisibleWhenBoxChecked == checkBox.IsCheckedInPostBack(formControlValues));
     }
 }
        private static void linkFirstPanelCheckBoxToNextPanelDisplay(PostBackValueDictionary formControlValues, Control outerPanel)
        {
            var           panelIndex = 0;
            BlockCheckBox checkBox   = null;
            Panel         panel      = null;

            foreach (var control in outerPanel.Controls.OfType <Panel>())
            {
                panelIndex += 1;
                if (panelIndex == 1)
                {
                    checkBox = getFirstCheckBox(control);
                }
                else if (panelIndex == 2)
                {
                    panel = control;
                }
            }
            if (checkBox != null && panel != null)
            {
                if (formControlValues == null)
                {
                    DisplayLinkingOps.AddDisplayJavaScriptToCheckBox(checkBox, true, panel);
                }
                else
                {
                    DisplayLinkingOps.SetControlDisplay(panel, checkBox.IsCheckedInPostBack(formControlValues));
                }
            }
        }
 void DisplayLink.AddJavaScript()
 {
     DisplayLinkingOps.AddDisplayJavaScriptToCheckBox(checkBox, controlsVisibleWhenBoxChecked, controls);
     if (checkBox.IsRadioButton)
     {
         addJavaScriptToOtherRadioButtonsInGroup(EwfPage.Instance);
     }
 }
        private void addJavaScriptToOtherRadioButtonsInGroup(Control control)
        {
            var cb = control as CommonCheckBox;

            if (cb != null && cb.GroupName == checkBox.GroupName && cb != checkBox)
            {
                DisplayLinkingOps.AddDisplayJavaScriptToCheckBox(cb, !controlsVisibleWhenBoxChecked, controls);
            }
            foreach (Control childControl in control.Controls)
            {
                addJavaScriptToOtherRadioButtonsInGroup(childControl);
            }
        }