mpx/App_Code/ACTComboBoxFixer.cs
/// <summary>
/// Use this when adding ACT Comboboxes that may be initially hidden when loaded.
/// It registers all comboboxes into a client-side array. If the user writes
/// scripts that make the ACT Comboboxes visible, they should call
/// ActComboBoxMadeVisible_All(), a client-side method.
/// </summary>
Use this when adding ACT Comboboxes that may be initially hidden when loaded.
It registers all comboboxes into a client-side array. If the user writes
scripts that make the ACT Comboboxes visible, they should call
ActComboBoxMadeVisible_All(), a client-side method.
Use this when adding ACT Comboboxes that may be initially hidden when loaded . It registers all comboboxes into a client - side array . If the user writes scripts that make the ACT Comboboxes visible they should call ActComboBoxMadeVisible_All () a client - side method .
public static void RegisterComboBox(AjaxControlToolkit.ComboBox pComboBox)
   {
      ClientScriptManager vClientScript = pComboBox.Page.ClientScript;
      if (!vClientScript.IsClientScriptBlockRegistered("ActComboBoxFixer"))
      {
         string vScript =
            "function ActComboBoxMadeVisible_All()\r\n" +
            "{\r\n" +
               "   if (window.gActComboboxes)\r\n" +
               "      for (var vI = 0; vI < window.gActComboboxes.length; vI++)\r\n" +
               "      {\r\n" +
               "         var vCB = $find(window.gActComboboxes[vI]);\r\n" +
               "         if (vCB)\r\n" +
               "         {\r\n" +
               "            ActComboBoxMadeVisible(vCB);\r\n" +
               "         }\r\n" +
               "      }\r\n" +  
            "}\r\n" +
            "function ActComboBoxMadeVisible(pCB)\r\n" +
            "{\r\n" +
               "  if (pCB && !pCB._optionListItemHeight)\r\n" +
               "  {\r\n" +
               "     var vBtn = pCB.get_buttonControl();\r\n" +
               "     vBtn.style.width = '';\r\n" +
               "     vBtn.style.height = '';\r\n" +
               "     pCB.initializeButton();\r\n" +
               "     pCB._optionListHeight = null;\r\n" +
               "     pCB._optionListWidth = null;\r\n" +
               "     pCB._optionListItemHeight = 21;\r\n" +
               "     pCB._getOptionListWidth();\r\n" +
               "     pCB._getOptionListHeight();\r\n" +
               "  }\r\n" +
            "}\r\n";
         vClientScript.RegisterClientScriptBlock(typeof(Page), "ActComboBoxFixer", vScript, true);
      }
      pComboBox.Page.ClientScript.RegisterArrayDeclaration("gActComboboxes", "'" + pComboBox.ClientID + "'");
   }
public static void RegisterComboBox ( AjaxControlToolkit . ComboBox pComboBox ) { ClientScriptManager vClientScript = pComboBox . Page . ClientScript ; if ( ! vClientScript . IsClientScriptBlockRegistered ( " " ) ) { string vScript = " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " + " \r \n " ; vClientScript . RegisterClientScriptBlock ( typeof ( Page ) , " " , vScript , true ) ; } pComboBox . Page . ClientScript . RegisterArrayDeclaration ( " " , " " + pComboBox . ClientID + " " ) ; }
Use this when adding ACT Comboboxes that may be initially hidden when loaded.
Use this when adding ACT Comboboxes that may be initially hidden when loaded .
pComboBox
AjaxControlToolkit.ComboBox