From 4792e9de5e95118ffcf5721a54ff76e4d21ea663 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 15 Oct 2020 23:50:56 +0000 Subject: [PATCH] case 3823 --- source/WinFormApp/ClientNotesForm.cs | 38 +++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/source/WinFormApp/ClientNotesForm.cs b/source/WinFormApp/ClientNotesForm.cs index 7b57667..57c700e 100644 --- a/source/WinFormApp/ClientNotesForm.cs +++ b/source/WinFormApp/ClientNotesForm.cs @@ -265,11 +265,43 @@ namespace AyaNova this.Text = Util.LocaleText.GetLocalizedText("ClientNote.Label.List") + " - " + AyaBizUtils.GetBizObjectName("Client", mClientID); + //case 3823 if (mClientNoteIdToDisplay != Guid.Empty) { - MessageBox.Show("STUB: scroll into view id " + mClientNoteIdToDisplay.ToString()); - } - + UltraGridRow DesiredRow = null; + //find the row with the note desired to be viewed + foreach (UltraGridRow ThisRow in Grid.Rows) { + object o = ThisRow.Cells["ID"].Value; + if (o != null && (Guid)o == mClientNoteIdToDisplay) + { + DesiredRow = ThisRow; + break; + } + } + if (DesiredRow != null) + { + // If user can edit then enter edit mode to open up the whole cell for viewing purposes + UltraGridCell NotesCell = DesiredRow.Cells["Notes"]; + if (NotesCell != null) + { + if (NotesCell.CanEnterEditMode) + { + BeginInvoke(new MethodInvoker(() => + { + NotesCell.Activate(); + Grid.PerformAction(UltraGridAction.EnterEditMode); + })); + } + else + { + //read only user path + //scroll into view and highlight the correct row so user can find it easily + DesiredRow.Activate(); + DesiredRow.Selected = true; + } + } + } + } } private void ClientNotesForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)