示例#1
0
        protected void cbxSelectOrDeselectAllGridItems_OnCheckedChanged(object sender, EventArgs e)
        {
            CheckBox cbx  = sender as CheckBox;
            GridView grid = BaseHelper.FindFirstParentOfSpecificType(cbx, typeof(GridView)) as GridView;

            BaseHelper.SelectOrDeselectAllEnabledGridCheckBox(grid, cbx.Checked, "cbxGridCheckbox");
        }
示例#2
0
        protected void btnCancelParentPanel_OnClick(object sender, EventArgs e)
        {
            Panel parentPnl = BaseHelper.FindFirstParentOfSpecificType(sender as Control, new Panel().GetType()) as Panel;

            if (parentPnl != null)
            {
                parentPnl.Visible = false;
            }
            else
            {
                throw new ArgumentException("Cound not find the parent panel");
            }
        }