/// <summary>
		/// 
		/// </summary>
		/// <param name="container"></param>
		public void InstantiateIn(Control container)
		{
			switch (this.templateType)
			{
				case DataControlRowType.Header:
					htmlControls.HtmlInputCheckBox checkBoxAll = new htmlControls.HtmlInputCheckBox();
					checkBoxAll.ID = "checkall";
					checkBoxAll.Name = this.checkItemName;
					checkBoxAll.Value = "选全";
					container.Controls.Add(checkBoxAll);

					if (this.isMultiSelect == false)
						checkBoxAll.Style["display"] = "none";

					break;
				case DataControlRowType.DataRow:
					InputButton checkBox = new InputButton();

					checkBox.Name = this.checkItemName;
					checkBox.ID = "checkitem";

					if (this.isMultiSelect)
						checkBox.ButtonType = InputButtonType.CheckBox;
					else
						checkBox.ButtonType = InputButtonType.Radio;

					checkBox.Value = "";
					container.Controls.Add(checkBox);
					break;
			}
		}
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="container"></param>
        public void InstantiateIn(Control container)
        {
            switch (this.templateType)
            {
            case DataControlRowType.Header:
                htmlControls.HtmlInputCheckBox checkBoxAll = new htmlControls.HtmlInputCheckBox();
                checkBoxAll.ID    = "checkall";
                checkBoxAll.Name  = this.checkItemName;
                checkBoxAll.Value = "选全";
                container.Controls.Add(checkBoxAll);

                if (this.isMultiSelect == false)
                {
                    checkBoxAll.Style["display"] = "none";
                }

                break;

            case DataControlRowType.DataRow:
                InputButton checkBox = new InputButton();

                checkBox.Name = this.checkItemName;
                checkBox.ID   = "checkitem";

                if (this.isMultiSelect)
                {
                    checkBox.ButtonType = InputButtonType.CheckBox;
                }
                else
                {
                    checkBox.ButtonType = InputButtonType.Radio;
                }

                checkBox.Value = "";
                container.Controls.Add(checkBox);
                break;
            }
        }