Page 1 of 1
OnCellEdited
Posted: Tue Jan 09, 2018 1:54 pm
by 18682546
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?
Re: OnCellEdited
Posted: Wed Jan 10, 2018 8:08 am
by yeray
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 (8.56 KiB) Viewed 28224 times
Re: OnCellEdited
Posted: Thu Jan 18, 2018 12:02 pm
by 18682546
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?
Re: OnCellEdited
Posted: Mon Jan 22, 2018 8:56 am
by yeray
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.
Re: OnCellEdited
Posted: Fri Jan 26, 2018 12:56 pm
by 18682546
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.
Re: OnCellEdited
Posted: Mon Jan 29, 2018 7:30 am
by yeray
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
Re: OnCellEdited
Posted: Mon Jan 29, 2018 12:02 pm
by 18682546
I have uploaded the test case. The click event behaves normally but the others (DblClick, OnSelect and OnCellEdited) seem to have issues.
Re: OnCellEdited
Posted: Tue Jan 30, 2018 9:50 am
by yeray
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
Re: OnCellEdited
Posted: Fri Feb 02, 2018 1:50 pm
by 18682546
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?
Re: OnCellEdited
Posted: Tue Feb 06, 2018 10:21 am
by yeray
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:
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.