Solved

Stopping a row change in a DBCustimGrid.

Posted on 2001-08-23
4
311 Views
Last Modified: 2010-04-06
I have a DBGrid component i have created, and everything is going fairly well, except i am trying to add a event that is called RowChanging(AllowChange : Boolean) with a property that either allows me to change the row or not depending on the result given.
then if it is ok, load the row and call a RowChanged Event....

how do i trap a row changing event, i have looked and apart from coding around it all with the before / after scroll events i cant see an easy way of doing it...

before I used a TCustomGrid and used the cell exit event and controlled it myself, but there isnt a cell change event on a DBGrid, there has to be a simple way that im missing...

Cheers Kristian
0
Comment
Question by:Kristian
  • 3
4 Comments
 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
usually if i want to avoid a rowchange in a standard-dbgrid then i use the beforescroll-event of the underlying dataset by simple placing a abort there
0
 
LVL 1

Author Comment

by:Kristian
Comment Utility
i found the BeforScroll Event, but how do you abort the action ?
0
 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
if somecondition then
  abort;
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 50 total points
Comment Utility
just to explain
the abort-procedure raises
a silent-exception,
the dataset will not scroll then
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 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

7 Experts available now in Live!

Get 1:1 Help Now