In v5 there was a GetCellAtPos function. I can't find anything similar in the latest version. I need to control the dragging and dropping of cells.
Posted 22 May 2017 - 01:35 AM
In v5 there was a GetCellAtPos function. I can't find anything similar in the latest version. I need to control the dragging and dropping of cells.
Posted 22 May 2017 - 05:35 PM
Posted 23 May 2017 - 03:00 AM
That worked. I am looking at the native dragdrop within the NextGrid61. It works better, but I would have a lot of code to rewrite on my end.
The only problem I am running into is if a column has a NxButtonEdit control assigned as the inplace editor, the dropped row exhibits a painting issue. The content in the row is not written correctly. A refresh of the NxGrid61 fixes it, but I don't see any way to refresh the grid when the drop is finished.
Any ideas?
Posted 23 May 2017 - 07:16 AM
Posted 23 May 2017 - 07:17 AM
Also, is there any documentation on how the validator works? I need to validate input before it gets written to the control or grid. Currently if a user types a number on a row that is not allowed, that number will initially appear in a NxButtonEdit.
Posted 23 May 2017 - 07:25 AM
Sure, I sent it to the support email.
Posted 23 May 2017 - 07:26 AM
Posted 23 May 2017 - 07:26 AM
Same subject line as the forum topic.
Posted 23 May 2017 - 07:34 AM
Posted 23 May 2017 - 08:19 AM
So the link you sent me helps a lot. Unfortunately I was not able to find that link initially.
I have been able to narrow it down to the inplace control itself. Even with the code below, the NxButtonEdit will still display the first key pressed. But only when moving with arrow keys between cells.
I can at least lock the 'CanLeave' preventing the value from being entered. I would like it to not display anything and not allow key entry. I am also manually validating the 'key' entry to prevent keystrokes that are not valid.
This is a 20+ year old program that I am attempting to update. Unfortunately the original grid vendor is no longer available and I need to update for newer versions of Windows. I already have 20+ hours invested in re-coding for this control. If all works well, I will be purchasing full support. I don't want to loose support again.
procedure TfrmMain.Grid1AcceptEdit(Sender: TObject; ACol, ARow: Integer;
var Text: WideString; var Accept, CanLeave: Boolean);
begin
If NOT rType[ARow] then {this array controls the type of row it is, number or a text/information}{not = it is not a number row}
begin
Accept := False; {does not appear to do anything}
CanLeave := False; {works and prevents moving with invalid data}
Text := ''; {does not pass back to the grid}
end;
end;
Posted 23 May 2017 - 08:43 AM
Posted 24 May 2017 - 04:19 AM
Turns out I needed the ‘NxGrid6BeforeEdit’ to capture the event. Thanks.
One further issue, I’ve been testing the events on the NxButtonEdit6. It appears that the enter key CHR(13) is not responded to by any events. Is this true? Is there any way to respond to it? Basically I need when the enter key is pressed on the control for it to write the contents to the grid and allow other code to be executed. Right now it writes the contents, but I have to hit enter a second time (NxGrid6KeyPress event) for any other code to execute.
I’ve tested capturing other keystrokes in the NxGridButton6ButtonKeyPress event and they allow code to be executed, just not the enter key.
Thanks,
Posted 24 May 2017 - 08:08 AM
Posted 26 May 2017 - 07:54 PM
Posted 27 May 2017 - 06:15 AM
That would be great. I am planning on coding all this weekend. It would be nice to put that issue to bed. As for the grid painting issue after a row drag with an inplace edit. Have you had a chance to look at the code I sent?
Thanks,
Posted 27 May 2017 - 11:59 AM
Posted 05 June 2017 - 05:10 AM
I've been able to resolve all my issues with the TNextGrid.OnAfterEdit and the TNextGrid.OnBeforeEdit events.
Question. Is the intern update only available for purchased users? I don't see the download on the main site.
Is it possible to have an event for the completion of the internal row drag-drop completion? Not only would a TNextGrid.Refresh work there but I could also respond to any changes that would affect calculations.
Also, I sent you a question on the source code purchase to support@bergsoft.net. I referenced this thread.
Thanks,
Posted 05 June 2017 - 01:39 PM
Posted 06 June 2017 - 02:24 AM
Thanks for the information. I attempted to use the event an it generated the following error...
[Error] MAIN.PAS(533): Undeclared identifier: 'INxRow'
procedure TfrmMain.NxReportGridView61RowMoveDrop(Sender: TObject; Row,
ParentRow: INxRow; CurIndex, NewIndex: Integer);
Posted 06 June 2017 - 10:45 PM
NextSuite v6 - VCL Components →
NextGrid v6 Component →
Problems with Drag and Drop.Started by lsquez, 10 Mar 2020 Drag Drop, drag, drop, DragMode and 1 more... |
|
|||
NextSuite v5 - VCL Components (Previous version) →
NextGrid Component →
Suppressing highlight of the selected cells/rowsStarted by IUnknown, 30 Mar 2014 highlight, no_highlight, nextgrid and 1 more... |
|
|||
NextSuite v5 - VCL Components (Previous version) →
NextGrid Component →
Error in Header-Click-Sort auf DragDrop ?Started by volkerw, 01 Mar 2013 Header, Sort, Drag, Drop, Order |
|
0 members, 0 guests, 0 anonymous users