/// <summary> /// Handles only delete action. /// </summary> protected void UniGrid_OnAction(string actionName, object actionArgument) { if (actionName == "delete") { WebPartLayoutInfoProvider.DeleteWebPartLayoutInfo(ValidationHelper.GetInteger(actionArgument, 0)); UniGrid.ReloadData(); } }
/// <summary> /// Deletes web part layout. Called when the "Delete layout" button is pressed. /// Expects the CreateWebPartLayout method to be run first. /// </summary> private bool DeleteWebPartLayout() { // Get the web part layout WebPartLayoutInfo deleteLayout = WebPartLayoutInfoProvider.GetWebPartLayoutInfo("MyNewWebpart", "MyNewLayout"); // Delete the web part layout WebPartLayoutInfoProvider.DeleteWebPartLayoutInfo(deleteLayout); return(deleteLayout != null); }