Solved

Problem with append using DBGrid

Posted on 1998-06-22
4
175 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
  • 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now