Solved

Stopping a row change in a DBCustimGrid.

Posted on 2001-08-23
4
318 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
ID: 6417304
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
ID: 6417315
i found the BeforScroll Event, but how do you abort the action ?
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6417326
if somecondition then
  abort;
0
 
LVL 27

Accepted Solution

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

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 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