void ProcessDeleteCommand(string[] items) { for (int i = 0; i < items.Length; i++) { string[] keys = EcfListView.GetPrimaryKeyIdStringItems(items[i]); if (keys != null) { int versionId = Int32.Parse(keys[0]); // delete selected version PageVersion.DeletePageVersion(versionId); } } }
/// <summary> /// Handles the DeleteCommand event of the MyListView control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="ComponentArt.Web.UI.GridItemEventArgs"/> instance containing the event data.</param> void MyListView_DeleteCommand(object sender, GridItemEventArgs e) { PageVersion.DeletePageVersion((int)(e.Item["VersionId"])); LoadDataAndDataBind(String.Empty); }