![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 7 of 7 total |
![]() |
Fri, Oct 7 2016 2:48 PM | Permanent Link |
thomh | Hi,
Inorder to avoid the "Database commit response error" I put this in the forms OnCreate event: Database.AutoTransactions := False; However, this causes the grid to not respond to keyboard scrolling (up/down keys). I can select with the mouse. // Thom |
Fri, Oct 7 2016 4:59 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Thom,
<< Inorder to avoid the "Database commit response error" I put this in the forms OnCreate event: Database.AutoTransactions := False; However, this causes the grid to not respond to keyboard scrolling (up/down keys). I can select with the mouse. >> Are you modifying any columns in the row before trying to move away ? Tim Young Elevate Software www.elevatesoft.com |
Fri, Oct 7 2016 5:00 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Thom,
My first guess would be that you've got a TDataSet.BeforeSave event handler that isn't returning True. Tim Young Elevate Software www.elevatesoft.com |
Sat, Oct 8 2016 5:36 AM | Permanent Link |
thomh | Tim,
Here's the code. The problem seems to be placing the loading of the dataset in the FormShow event. Note that Form2 is created in panel on Form1. procedure TForm2.DataSetCreate(Sender: TObject); begin Database.AutoTransactions := False; end; // ******** Placing the code here does not allow me use the up/down keys procedure TForm2.Form2Show(Sender: TObject); begin DataSet.Open; DataSet.Insert; DataSet.Columns['Description'].AsString := 'Doc 1'; DataSet.Save; DataSet.Insert; DataSet.Columns['Description'].AsString := 'Doc 2'; DataSet.Save; DataSet.First; Grid1.SetFocus; end; // ******* Placing the code in a button click event works fine procedure TForm2.Button1Click(Sender: TObject); begin DataSet.Open; DataSet.Insert; DataSet.Columns['Description'].AsString := 'Doc 1'; DataSet.Save; DataSet.Insert; DataSet.Columns['Description'].AsString := 'Doc 2'; DataSet.Save; DataSet.First; Grid1.SetFocus; end; // ****** Changing the FormShow event to this works as well procedure TForm2.Form2Show(Sender: TObject); begin async Button1Click(nil); end; // Thom |
Sun, Oct 9 2016 1:33 PM | Permanent Link |
Raul Globestar Systems ![]() | On 10/8/2016 5:36 AM, thomh wrote:
> Here's the code. The problem seems to be placing the loading > of the dataset in the FormShow event. Note that Form2 is created > in panel on Form1. I suspect it's simply that the grid does not get focus for keyboard events to work. If you click on grid once with the mouse do the arrows then work ? > // ******** Placing the code here does not allow me use the up/down keys > procedure TForm2.Form2Show(Sender: TObject); > begin > DataSet.Open; > DataSet.Insert; > DataSet.Columns['Description'].AsString := 'Doc 1'; > DataSet.Save; > DataSet.Insert; > DataSet.Columns['Description'].AsString := 'Doc 2'; > DataSet.Save; > DataSet.First; > Grid1.SetFocus; > end; Have you tried changing just the Grid1.SetFocus to be async ? Raul |
Sun, Oct 9 2016 2:47 PM | Permanent Link |
thomh | Raul,
async Grid1.SetFocus works. >>If you click on grid once with the mouse do the arrows then work ? No, they do not. // Thom |
Tue, Oct 11 2016 1:31 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Thom,
<< No, they do not. >> You're probably seeing the grid focus bug that was introduced in 2.05. I'm doing a new 2.05 B5 soon, and that will have a fix for this issue. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Sunday, March 26, 2023 at 04:50 AM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |