OnCellEdited

TeeGrid VCL / FMX for Embarcadero RAD Studio, Delphi, C++ Builder and Lazarus Free Pascal.
Post Reply
ghanshaw
Newbie
Newbie
Posts: 13
Joined: Wed Dec 13, 2017 12:00 am

OnCellEdited

Post by ghanshaw » Tue Jan 09, 2018 1:54 pm

I am trying to use the OnCellEdited event with TeeGrid but I can't seem to get the event to fire. Is there some setup for it that I need to add?

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: OnCellEdited

Post by Yeray » Wed Jan 10, 2018 8:08 am

Hello,

It works for me in TeeGrid v1.03 adding it as any other event: DoubleClick the white box next to the event in the Object Inspector to create the event:
bds_2018-01-10_09-00-22.png
bds_2018-01-10_09-00-22.png (8.56 KiB) Viewed 28122 times
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

ghanshaw
Newbie
Newbie
Posts: 13
Joined: Wed Dec 13, 2017 12:00 am

Re: OnCellEdited

Post by ghanshaw » Thu Jan 18, 2018 12:02 pm

We are handling the events on the parent form. When I attempt to add the OnCellEdited event from the parent form (TAvScreenForm) but it complains that the parameter list is incompatible. I have used the same parameters that are present for the local form but it does not seem to like it.

TCustomTeeGridAccess = class(TVCLTeeGrid);
TAvScreenForm = class(TForm)
.
.
.
procedure OnCellEdited(Sender: TObject; AEditor: TControl; AColumn: TColumn; ARow: Integer; ChangeData: Boolean; NewData: string);

Where have I gone wrong?

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: OnCellEdited

Post by Yeray » Mon Jan 22, 2018 8:56 am

Hello,

Do the events from other components in the same form work as usual?
Could you please arrange a simple example project so we can reproduce the problem here?

Thanks in advance.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

ghanshaw
Newbie
Newbie
Posts: 13
Joined: Wed Dec 13, 2017 12:00 am

Re: OnCellEdited

Post by ghanshaw » Fri Jan 26, 2018 12:56 pm

I have an test case I can send but it is 2.4 MB and will not attach to this reply. How can I send it to you?

I have defined the methods for the events (OnClick, OnDblClick, OnCellEdited and OnSelect) for Section4 of the Ticker form on the parent form (AvScreen).

The first issue comes when trying to attach the OnCellEdited event to the Section4 TeeGrid. You have to type it but cannot select it. When you go to save it complains about this event having an incompatible parameter list. It seems to work unless I try to use the NewData in the method. This causes a memory overflow issue.

The second issue is when I add the OnSelect event it causes an AccessVioaltion when you launch the Ticker form which raises hell with all of the FormCreate logic.

The third issue can be seen by removing the OnCellEdited and OnSelect events the Ticker form. The form then loads normally but if you double click on a cell you only get the OnClick event at the parent form. Removing the OnClick event allows the OnDblClick event to work but obviously isn't a soluition.

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: OnCellEdited

Post by Yeray » Mon Jan 29, 2018 7:30 am

Hello,
ghanshaw wrote:I have an test case I can send but it is 2.4 MB and will not attach to this reply. How can I send it to you?
You can use this page:
http://steema.net/upload
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

ghanshaw
Newbie
Newbie
Posts: 13
Joined: Wed Dec 13, 2017 12:00 am

Re: OnCellEdited

Post by ghanshaw » Mon Jan 29, 2018 12:02 pm

I have uploaded the test case. The click event behaves normally but the others (DblClick, OnSelect and OnCellEdited) seem to have issues.

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: OnCellEdited

Post by Yeray » Tue Jan 30, 2018 9:50 am

Hello,

Thanks for the project (note we don't need the .exe) I could reproduce the problems so I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1980
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

ghanshaw
Newbie
Newbie
Posts: 13
Joined: Wed Dec 13, 2017 12:00 am

Re: OnCellEdited

Post by ghanshaw » Fri Feb 02, 2018 1:50 pm

The fact that the events don't work correctly on the parent form is a show stopper for us. Any chance the bug fix can be upgraded from enhancement to something more critical?

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: OnCellEdited

Post by Yeray » Tue Feb 06, 2018 10:21 am

Hello,

After revising the project, we found the OnCellEdited event can be fired without problems declaring it at TTickerForm (where the TTeeGrid is), making sure it calls "inherited", and copying the event to the ancestor TAvScreenForm:
Test6_2.zip
(273.36 KiB) Downloaded 1492 times
I'm also closing the ticket #1980.
Don't hesitate to let us know if we missed something and we'll be glad to take another look at it, and to reopen the ticket if necessary.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply