EhLib.Com https://forum.ehlib.com/en/ |
|
MemTableEh Access Violation while searching https://forum.ehlib.com/en/viewtopic.php?f=5&t=813 |
Page 1 of 1 |
Author: | Svetoslav [ 20 Apr 2018, 11:17 ] | ||
Post subject: | MemTableEh Access Violation while searching | ||
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
|
Author: | Svetoslav [ 03 Aug 2018, 11:05 ] |
Post subject: | Re: MemTableEh Access Violation while searching |
Is there any information on this topic? |
Author: | EhLibSupport [ 05 Aug 2018, 12:18 ] |
Post subject: | Re: MemTableEh Access Violation while searching |
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. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |