Edit Events article for NextGrid6
#1
Posted 04 April 2016 - 01:16 PM
Here is a new article about NextGrid v6 edit events:
http://developer.ber...hp?topic_id=683
Diagram is a little big, but I hope it helps understanding these group of events better.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#2
Posted 13 May 2020 - 05:53 AM
Hello Boki,
I have a simple NextGrid with 3 columns and 3 rows. When I try to edit value or change color of a cell[0,0], while other cell[1,1] is in edit mode, the EditText of the cell[1,1] changes with the value of the cell[0,0].
Here is example of my code:
procedure TForm1.Button1Click(Sender: TObject); begin Nextgrid61.AddCells(['300','Mamma','vector'],[0,1,2]); Nextgrid61.AddCells(['50','Papa','mode'],[0,1,2]); Nextgrid61.AddCells(['2555','sota','tor'],[0,1,2]); nextgrid61.EditCell(1,1); end; procedure TForm1.NextGrid61KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if key=vk_F1 then nextgrid61.Cell[0,0].Font.color:=clRed; end;
When I press F1 two actions happened:
1. color of cell[0,0] changes to red.
2. Edit text of cell[1.1] become "300"
So, how to avoid the second action ?
Best Regards
Bicks
#3
Posted 15 May 2020 - 09:52 AM
Hello Bicks,
Very veird problem. I will try to debug it and fix it.
I hope that I will have fixed it for upcoming release.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#4
Posted 15 May 2020 - 10:11 AM
Hi,
Try to change next line 254 in NxGrid6.pas:
if Assigned(InplaceEdit) then begin if (Location = EditingCell) then InplaceEdit.AssignValue(Cell); // <---- updated line end;
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#5
Posted 17 May 2020 - 09:20 AM
Thank you, Boki.
It worked fine, now.
And the better thing is, that this code also solve few other issues that I had.
So great Thanks for you.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users