/// <summary> /// Deletes web part container. Called when the "Delete container" button is pressed. /// Expects the CreateWebPartContainer method to be run first. /// </summary> private bool DeleteWebPartContainer() { // Get the web part container WebPartContainerInfo deleteContainer = WebPartContainerInfoProvider.GetWebPartContainerInfo("MyNewContainer"); // Delete the web part container WebPartContainerInfoProvider.DeleteWebPartContainerInfo(deleteContainer); return(deleteContainer != null); }
/// <summary> /// Handles the UniGrid's OnAction event. /// </summary> /// <param name="actionName">Name of item (button) that throws event</param> /// <param name="actionArgument">ID (value of Primary key) of corresponding data row</param> protected void uniGrid_OnAction(string actionName, object actionArgument) { switch (actionName.ToLowerCSafe()) { case "edit": URLHelper.Redirect(string.Format("Container_Edit_Frameset.aspx?containerid={0}&hash={1}&tabmode=1", Convert.ToString(actionArgument), QueryHelper.GetHash(string.Empty))); break; case "delete": WebPartContainerInfoProvider.DeleteWebPartContainerInfo(Convert.ToInt32(actionArgument)); break; } }