Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 28 Mar 2024, 18:02

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 20 Apr 2018, 11:17 
Offline

Joined: 08 Sep 2017, 10:37
Posts: 8
Hello,
We are using TMemTableEh with TDBGridEh in a tree mode. While searching in the grid with the option FilterOnTyping enabled an access violation is triggered.
For the search option we are using the OnKeyPress event to process directly the search text (example bellow):
type
THackDBGridEh = class(TDBGridEh)
end;


procedure TForm1.DBGridEh1KeyPress(Sender: TObject; var Key: Char);
begin
if not DBGridEh1.SearchPanel.Active and Key.IsLetterOrDigit then
begin
DBGridEh1.SearchPanel.Active := true;
with THackDBGridEh(DBGridEh1).FSearchPanelControl.FindEditor do
begin
Text := Key;
SelStart := Length(Text);
end;
end;
end;

With this the AV is present every time we type an alphabetic symbol. We manage to reporoduce the problem without the OnKeyPress event as well, but it is not constant.
We are using Delphi 10.2 Tokyo, EhLib 9.1.040. The tests were made with the DBGridEh.TreeView demo.

The access violation triggers in Unit MemTableDataEh, function TMemRecViewEh.GetRec, line 8749. We are attaching a screen shoot from the call stack.

Best regards


Attachments:
MemTableDataEh.png
MemTableDataEh.png [ 140 KiB | Viewed 1248 times ]
Top
 Profile  
 
PostPosted: 03 Aug 2018, 11:05 
Offline

Joined: 08 Sep 2017, 10:37
Posts: 8
Is there any information on this topic?


Top
 Profile  
 
PostPosted: 05 Aug 2018, 12:18 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

Try to set DBGridEh.Options.dgEditing to false.

Grid goes into DataSet.Edit mode before execution reaches the code DBGridEh1KeyPress.
Then it try to cancel edit and fails.

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group