Solved

Problem with append using DBGrid

Posted on 1998-06-22
4
181 Views
Last Modified: 2012-05-07
I have a popup menu associated to the DBGrid. When I choose Add item from the menu (righ-clicking on the DBGrib), the append method do not work correctly. If I used the same code but called from a button click, all is fine.

My code:
    SelfSource.DataSet.Append;
    DBEdtNom.Setfocus;
    btnAdd.Enabled := true;

Don<t understand why it don't at one place and not from the other????
0
Comment
Question by:pjroy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Expert Comment

by:Matvey
ID: 1355215
Hmmm, please, if it's not so hard, send me the sources to bosism@netvision.net.il
0
 
LVL 10

Expert Comment

by:Jacco
ID: 1355216
Tried it and it works fine here...
0
 

Author Comment

by:pjroy
ID: 1355217
To Matvey:

I sent you a mail with my source!
Thanks a lot
0
 
LVL 3

Accepted Solution

by:
Matvey earned 10 total points
ID: 1355218
Seen the project, and for anybody elese interested:

The problem is in the sequence of the commands.

Now you have these lines of code:

  SelfSource.DataSet.Append;
  DBEdtNom.Setfocus;
  btnAdd.Enabled := true;

Just exchange the two first lines:

  DBEdtNom.Setfocus;
  SelfSource.DataSet.Append;
  btnAdd.Enabled := true;

Cheers everybody
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
firemonkey Android Listview Sort items 7 106
Firemonkey how to swip panel with finger tap 1 42
Posting a string with PostMessage 23 49
TAction.OnAfterExecute? 2 32
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question