/// <summary> /// Deletes inline control. Called when the "Delete control" button is pressed. /// Expects the CreateInlineControl method to be run first. /// </summary> private bool DeleteInlineControl() { // Get the inline control InlineControlInfo deleteControl = InlineControlInfoProvider.GetInlineControlInfo("MyNewControl"); // Delete the inline control InlineControlInfoProvider.DeleteInlineControlInfo(deleteControl); return (deleteControl != 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) { if (actionName == "edit") { URLHelper.Redirect("Frameset.aspx?inlinecontrolid=" + Convert.ToString(actionArgument)); } else if (actionName == "delete") { // Delete InlineControlInfo object from database InlineControlInfoProvider.DeleteInlineControlInfo(ValidationHelper.GetInteger(actionArgument, 0)); } }