Exemple #1
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
            if ((ControlId != null) && (HeaderRow != null))
            {
                ((Image)(HeaderRow.FindControl(ControlId))).ImageUrl = ImageUrl;
            }
            if (Controls.Count > 0)
            {
                var scripTag = new HtmlGenericControl("input");
                scripTag.Attributes.Add("class", "resetToDefaultValue");
                scripTag.Attributes.Add("type", "hidden");
                scripTag.Attributes.Add("value", _resetToDefaultValueOnRowEditCancel.ToString());
                Controls.Add(scripTag);
                scripTag = new HtmlGenericControl("input");
                scripTag.Attributes.Add("class", "readOnlyRowInInit");
                scripTag.Attributes.Add("type", "hidden");
                scripTag.Attributes.Add("value", _readOnlyRowInInit.ToString());
                Controls.Add(scripTag);
                //ReadOnlyRowInInit

                scripTag = new HtmlGenericControl("input");
                scripTag.Attributes.Add("class", "readOnlyGrid");
                scripTag.Attributes.Add("type", "hidden");
                scripTag.Attributes.Add("value", _readOnly.ToString());
                Controls.Add(scripTag);
            }
        }
Exemple #2
0
 public void SelectAllCheckBoxes()
 {
     for (var i = 0; i < Rows.Count; i++)
     {
         ((CheckBox)HeaderRow.FindControl("selectAllCheckBox")).Checked     = true;
         ((CheckBox)Rows[i].Cells[0].FindControl("selectCheckBox")).Checked = true;
     }
 }