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"); }
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"); } }