protected void grdBookmarks_DeleteCommand(object source, DataGridCommandEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { int markerID = Convert.ToInt32(e.Item.Cells[0].Text); markerCon.DeleteMarker(markerCon.GetMarkerByMarkerID(markerID)); e.Item.Visible = false; } }
void OnEditDelete() { var data = UIStateManager.current.popUpManager.GetModalPopUpData(); data.title = "Delete Marker?"; data.text = $"Are you sure you wish to delete the marker {m_MarkerEdit.Name}? This cannot be undone."; data.negativeText = "Cancel"; data.positiveText = "Delete"; data.negativeCallback = () => { }; data.positiveCallback = () => { m_MarkerController.DeleteMarker(m_MarkerEdit.ToMarker()); EditClose(); }; UIStateManager.current.popUpManager.DisplayModalPopUp(data); Dispatcher.Dispatch(SetDeltaDNAButtonAction.From($"{k_DeltaDNAPrefix}Delete")); }