?
Solved

Stopping a row change in a DBCustimGrid.

Posted on 2001-08-23
4
Medium Priority
?
326 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
[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
  • 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 200 total points
ID: 6417332
just to explain
the abort-procedure raises
a silent-exception,
the dataset will not scroll then
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month15 days, 6 hours left to enroll

770 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